This is a TypeScript based boilerplate which runs an HTTP Server configured to answer the endpoints defined in the received challenge. All endpoints are configured in src/controllers folder and if you go deeper to the controllers, you will see the specific implementation of each one.
- Clone the repository
git clone https://github.com/Batta32/asapp-challenge.git
- Install Docker
- Install NodeJS
- Install Postman
The sample uses the port 8080 by default.
- Open a terminal
- Pull Docker image for ASAPP challenge
docker pull batta32/asapp-challenge
- Run the downloaded container in port 8080
docker run -p 8080:8080 -it batta32/asapp-challenge
- Hit the supported endpoints specified here using Postman
- Open a terminal
- Go to the location of the cloned project
- Install the dependencies of the sample
npm install
- Start the sample
npm run start
- Hit the supported endpoints specified here using Postman
POST /health
: check the health of the systemPOST /users
: create a user in the systemPOST /login
: log in as an existing userPOST /messages
: send a message from one user to anotherGET /messages
: fetch all existing messages to a given recipient, within a range of message IDs