Chat API project with RabbmiMQ, MongoDB, SocketIO and TypeScript
Table of Contents
- node & npm & npx & typescript
- Docker
- Clone the repo
git clone https://github.com/muhammedikinci/ts-chat-api cd ./ts-chat-api
- Run docker compose file (with data)
docker compose -p "chat" up -d
-
API can be restarted many times until RabbitMQ and MongoDB is ready to accept the connection
restart: on-failure
-
Frontend project https://github.com/muhammedikinci/chat-client
This action needs the installation of RabbitMQ and MongoDB manually.
-
Clone the repo
git clone https://github.com/muhammedikinci/ts-chat-api cd ./ts-chat-api
-
Install dependencies
npm install -g typescript npm install -g ts-node npm install
-
Start RabbitMQ and MongoDB Services
-
Build typescript
npm run build
-
Start
npm run start
curl --request POST \
--url http://localhost:8291/api/register \
--header 'Content-Type: application/json' \
--data '{
"username":"muhammed",
"password":"123456789"
}'
curl --request POST \
--url http://localhost:8291/api/login \
--header 'Content-Type: application/json' \
--data '{
"username":"muhammed",
"password":"123456789"
}'
npm run test
Muhammed İKİNCİ - muhammedikinci@outlook.com