this project is a backend for Mira
which is a realtime chat-app.
for now only backend is completed. however api-docs are privided and you can make your own frontend
for this backend.
- nodejs/express
- postgresql
- socket.io
- prisma
- nodejs
- npm
- postgresql
- docker
- docker compose
this project is also dockerized. so to run it on production enviroment follow this steps:
- clone project:
git clone https://github.com/dalmamad/mira-backend.git
- go to the project root folder:
cd mira-backend
-
set your enviroment variables in docker-compose.yml and .env.production files
-
use docker:
sudo docker compose build
sudo docker compose up
you can run this project in development enviroment with or without docker
- make sure
nodejs
andpostgresql
are installed on your system. - make sure
postgresql
is running on you system. - set your enviroment variables in .env.development file.
- after downloading repo, go to the project root folder and execute this command on terminal
npm i
- you also need to run this command to add schema to your database:
npm run migrate:dev
- make sure
docker
anddocker compose
are installed on your system. - set your enviroment variables in docker-compose.development.yml and .env.development files
- run this commands:
sudo docker compose -f docker-compose.development.yml build
sudo docker compose -f docker-compose.development.yml up
both Http
and WebSocket
protocols are used in this project.
http documents are provided using swagger.
after running server you can get document on path http://localhost:3040/docs/http
unfortunately there is no tool similar to swagger for describing WebSocket so for this reason document is provided in markdown format.
after running server you can get this document on path http://localhost:3040/docs/ws