This is a simple messaging api for a chat application.
https://documenter.getpostman.com/view/25678847/2s93zFWype#intro
- Users are able to create an account using the
signupendpoint - Users can login using the
loginendpoint - Users can update their firstname and lastname using the
usersendpoint - Users can establish connection with another user with
connectionendpoint - Users can also view all their connections using the
connectionendpoint - Users can send text messages to their connections using the
messageendpoint - Users can send visual messages to their connections using the
messageendpoint - Users can delete messages using the
messageendpoint
- Automated tests
- Unit test thoroughly test functionality of each api
- Security Measures
- Authenticate users using
cookiesandjson web tokens - Give proper authroizations to users and admin
- Enable user friendly rate limiting for each api
- Authenticate users using
-
- Insert Trebble API Key
- Insert Cloudinary Keys : For Uploading Images and Videos
TREBLLE_API_KEY=<your treblle api key> TREBLLE_PROJECT_ID=<your treblle project id> CLOUD_NAME="<your cloudinary cloud name>" CLOUDINARY_KEY="<your cloudinary key>" CLOUDINARY_SECRET="<your cloudinary secret>" -
You can either set up using docker or on your local computer
- Using Docker
docker run --name message-api-redis -p 6379:6379 -d redis- Install on your computer: https://redis.io/docs/getting-started/installation/
-
You can set up using docker or install on your local computer
- Using docker
docker pull mongo docker run --name messag-api-db -p 27017:27017 -d mongo- Install on your computer: https://www.mongodb.com/docs/manual/installation/
-
npm install -
You can start the app immediately using
npm run devor
You can populate the database with some users before starting the application
npm run seed:up npm run devYou will have the following users in your database
{ username: "Ndohjapan", firstname: "Joel", lastname: "Ndoh", password: "P4ssword@" }, { username: "Johnny", firstname: "David", lastname: "George", password: P4ssword@" },You can also clear the database any time
npm run seed:down
-
- Insert Trebble API Key
- Insert Cloudinary Keys : For Uploading Images and Videos
TREBLLE_API_KEY=<your treblle api key> TREBLLE_PROJECT_ID=<your treblle project id> CLOUD_NAME="<your cloudinary cloud name>" CLOUDINARY_KEY="<your cloudinary key>" CLOUDINARY_SECRET="<your cloudinary secret>" -
You can either set up using docker or on your local computer
- Using Docker
docker run --name message-api-redis -p 6379:6379 -d redis- Install on your computer: https://redis.io/docs/getting-started/installation/
-
You can set up using docker or install on your local computer
- Using docker
docker pull mongo docker run --name messag-api-db -p 27017:27017 -d mongo- Install on your computer: https://www.mongodb.com/docs/manual/installation/
-
npm run test