Skip to content

Batta32/asapp-challenge

Repository files navigation

ASAPP Chat Backend Challenge v1

Overview

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.

Prerequisites

  • Clone the repository
    git clone https://github.com/Batta32/asapp-challenge.git
  • Install Docker
  • Install NodeJS
  • Install Postman

To try this sample

The sample uses the port 8080 by default.

Using Docker

  1. Open a terminal
  2. Pull Docker image for ASAPP challenge
    docker pull batta32/asapp-challenge
  3. Run the downloaded container in port 8080
    docker run -p 8080:8080 -it batta32/asapp-challenge
  4. Hit the supported endpoints specified here using Postman

Locally

  1. Open a terminal
  2. Go to the location of the cloned project
  3. Install the dependencies of the sample
    npm install
  4. Start the sample
    npm run start
  5. Hit the supported endpoints specified here using Postman

Supported endpoints

  • POST /health: check the health of the system
  • POST /users: create a user in the system
  • POST /login: log in as an existing user
  • POST /messages: send a message from one user to another
  • GET /messages: fetch all existing messages to a given recipient, within a range of message IDs

Further Reading

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published