Git Product home page Git Product logo

mira-backend's Introduction

Mira-backend

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.

Technologies Used

  • nodejs/express
  • postgresql
  • socket.io
  • prisma

Prerequisites

  • nodejs
  • npm
  • postgresql
  • docker
  • docker compose

installation

production

this project is also dockerized. so to run it on production enviroment follow this steps:

  1. clone project:
git clone https://github.com/dalmamad/mira-backend.git
  1. go to the project root folder:
cd mira-backend
  1. set your enviroment variables in docker-compose.yml and .env.production files

  2. use docker:

sudo docker compose build
sudo docker compose up

development

you can run this project in development enviroment with or without docker

without docker

  1. make sure nodejs and postgresql are installed on your system.
  2. make sure postgresql is running on you system.
  3. set your enviroment variables in .env.development file.
  4. after downloading repo, go to the project root folder and execute this command on terminal
npm i
  1. you also need to run this command to add schema to your database:
npm run migrate:dev

with docker

  1. make sure docker and docker compose are installed on your system.
  2. set your enviroment variables in docker-compose.development.yml and .env.development files
  3. run this commands:
sudo docker compose -f docker-compose.development.yml build
sudo docker compose -f docker-compose.development.yml up

Documents

both Http and WebSocket protocols are used in this project.

Http

http documents are provided using swagger.

after running server you can get document on path http://localhost:3040/docs/http

WebSocket

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

mira-backend's People

Contributors

dalmamad avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.