This is a basic starter template for a Node.js backend app with basic dependencies installed already. The app is dockerised with MongoDB and PostgreSQL support out-of-the-box.
- PostgreSQL used as the primary database.
- Containerized using Docker and managed using docker-compose.
- DB Connection already established in the NodeJS app.
To get a local copy of this template up and running on your machine, follow these simple steps.
- Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
- Clone the repo
git clone https://github.com/akshat2602/Node-Express-Boilerplate.git
- Change the current directory to the template
cd node-express-boilerplate
- To get started with development first build the dev containers using the following command
docker-compose -f docker-compose.dev.yml build
- The env file being used for development is called
.env.dev
- Run the containers using the command
docker-compose -f docker-compose.dev.yml up
- To get started with development first build the dev containers using the following command
docker-compose -f docker-compose.prod.yml build
- The env file being used for production is called
.env
which can be created using the commandcp ./.env.dev ./.env
- Run the containers using the command
docker-compose -f docker-compose.prod.yml up -d
- New packages can be installed through your preferred terminal using the normal
npm i
command following which the containers need to be rebuild for the app to start working again.
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Akshat Sharma - akshatsharma2602@gmail.com Project Link: https://github.com/akshat2602/Node-Express-Boilerplate