Coder Social home page Coder Social logo

node-express-boilerplate's Introduction

๐Ÿ“Œ Tech stack

  • Node
  • Express
  • React
  • Mongo
  • Docker

๐Ÿ”– General Instructions

  • ๐Ÿ“ Create .env file by copying contents of .env.sample file
  • ๐Ÿท๏ธ By default Node server will run on port 5000 and React will run on port 3000 (In case if needed to change this behaviour modify the .env file inside the app directory)
  • โœจ Make sure the port 5000 and 6000 of the host machine is not used by other services since docker attaches the backend service to port 5000 and mongodb to 6000 of the host machine (To change this behaviour modify the .env file inside the root directory)
  • ๐Ÿ” Demo credentials to login
  • ๐Ÿ“ฆ Frontend is not dockerized
  • ๐Ÿ—๏ธ MVC architecture has been followed
  • โ™ป๏ธ .env file inside the app directory will be used while running without docker and .env file at root directory will be used while running with docker

๐Ÿš€ To run the project without docker

Starting backend (Node server)

  • Navigate to backend/app directory
  • Run the command npm install
  • Run the command npm start
  • Seed the database with user's data by using the command npx mongoose db:seed:all

๐Ÿณ To run the project using docker

  • Navigate to backend directory
  • Run the code docker-compose up -d
  • Find the container ID of node container by using the command docker ps
  • Access the docker container shell using the command docker exec -it CONTAINER_ID sh (Replace the CONTAINER_ID with actual container id obtained from the previous step)
  • Seed the database with user's data by using the command npx mongoose db:seed:all

node-express-boilerplate's People

Contributors

sharonpraju avatar

Stargazers

AMAL SANTHOSH 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.