Before you begin, make sure you have the following installed on your machine:
- Node.js (version 18.X or higher)
- npm (Node Package Manager)
- Clone the repository to your local machine:
git clone git@github.com:2k4sm/1b2b-backend.git
- Navigate to the project directory:
cd 1b2b-backend
- Install the project dependencies:
npm install
-
Create a
.envfile in the root directory of the project. -
Open the
.envfile and add the following environment variables:
PORT=8000
AWS_DEFAULT_REGION=<Region>
AWS_ACCESS_KEY_ID=<Key>
AWS_SECRET_ACCESS_KEY=<SECRET>
AWS_SESSION_TOKEN=<OPTIONAL-SESSION>
make ensure to export the aws keys into your dev environment.
To start the API server, run the following command:
npm run dev
The API will be accessible at http://localhost:8000.
The following are the available endpoints of the 1b2b API:
GET /: health check.POST /analyse: takes a file as form.
Feel free to explore and test these endpoints using a tool like Postman.