Simple chat api with basic authentification.
I keep the database schema fairly simple with mongoose
.
yarn install
yarn start
Each description of endpoint will formatted like the following:
[HTTP METHOD] [ENDPOINT] - [DESCRIPTION]
This endpoint is used to create a user.
POST /register - Register a user
# curl(1) test, copy & paste this on your terminal
curl -X POST \
-H 'Content-Type: application/json' \
-d '{"username":"test", "password":"12345678"}' \
https://oy-chat-api.herokuapp.com/register
This endpoint is used to login.
POST /login - Login user
# curl(1) test, copy & paste this on your terminal
curl -X POST \
-H 'Content-Type: application/json' \
-d '{"username":"test", "password":"12345678"}' \
https://oy-chat-api.herokuapp.com/login
This endpoint is used to blast message.
POST /blast - Blast message
# curl(1) test, copy & paste this on your terminal
curl -X POST \
-H 'Content-Type: application/json' \
-d '{"message":"test"}' \
https://oy-chat-api.herokuapp.com/blast
How to contributing for this project
yarn precommit
yarn commit