create .env:
PORT = 8000 # optional default to 5000
TOKEN_SECRET="super secret" # jwt secret
BCRYPT_PASSWORD="your secret string" # hashing password
SALT_ROUNDS=10 # hashing password
MONGO_DB_URL="your mongoDB url" Run:
npm installnpm start
Note:
project will listen to the following url (127.0.0.1:8000)
to test chat 1:1 open the url at /
Run:
cd frontend/npm installnpm start
Note:
project will listen to the following url (127.0.0.1:3000)
- api end points documentation
- signup [ x ]
- login [ x ]
- logout [ x ]
- search all users [ x ]
users/ - get a user by id [ ]
users/:id - update a user data by id [ ]
users/:idPUT - delete a user by id [ ]
users/:idDELETE - get all chats [ ]
chats/GET - get a chat by id [ ]
chats/:idGET - search for a chat [ ]
chats/search/:idGET - get a message by id [ ]
chats/:id/messages/:idGET - create new group [ ]
chats/POST - user can create a message [ ]
chats/:id/messages/POST - user can update a message by id [ ]
chats/:id/messages/:idPUT - user can delete a message by id [ ]
chats/:id/messages/:idDELETE - user add users to a group [ ]
chats/:id/add/POST - remove users from a group [ ]
chats/:id/remove/POST - set group admin [ ]
chats/:id/admin/POST - update group settings [ ]
chats/:id/settings/PUT - banned chats [ ]
chats/:id/banned/POST