This app has a Login page, a Register page, it has also an avatar system. You can chat with multiple people!
Clone the project
git clone https://github.com/atom1488/procto-chat.git
Go to the public directory and install dependencies
cd public
yarn install
Then go back to the root and go to the server directory, create a .env file and install dependencies
cd ../server
echo "MONGO_URL = " > .env
yarn install
And start the server
yarn start
Then, go to the public directory and start the app
cd ../public
yarn start
To run this project, you will need to add the following environment variables to your .env file
PORT
(not required, default port is 2000)
MONGO_URL
POST /api/auth/register
Parameter | Type | Description |
---|---|---|
username |
string |
Required. Username of the account |
email |
string |
Required. E-Mail of the account |
password |
string |
Required. Password of the account |
POST /api/auth/login
Parameter | Type | Description |
---|---|---|
username |
string |
Required. Username of the account |
password |
string |
Required. Password of the account |
POST /api/auth/setAvatar/{id}
Parameter | Type | Description |
---|---|---|
id |
string |
Required. Id of the user |
image |
string |
Required. Base64 encoding of the image |
GET /api/auth/allUsers/{id}
Parameter | Type | Description |
---|---|---|
id |
string |
Required. Id of a user |
POST /api/messages/addmsg
Parameter | Type | Description |
---|---|---|
from |
string |
Required. Id of the user sending the message |
to |
string |
Required. Id of the user that is recieving the message |
message |
string |
Required. Message to send |
POST /api/messages/getmsg
Parameter | Type | Description |
---|---|---|
from |
string |
Required. Id of the user sending messages |
to |
string |
Required. Id of the user that is recieving messages |