Skip to content

๐Ÿ˜‹ Boilerplate for a backend application featuring NodeJS, TypeScript, Express, Postgres SQL, Docker

Notifications You must be signed in to change notification settings

dobschal/node-backend-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Node Backend Boilerplate

This repository contains boilerplate code to cook your own backend app with NodeJS, TypeScript, Postgres SQL and Docker.

๐Ÿš€ Get Started

You need to have Docker installed.

Then use Docker Compose to run the server.

docker-compose up

This will run the server on the configured port and enable auto-restart on code changes ๐Ÿ˜Ž!

๐Ÿ”จ Build & Run

Build the docker image with name node-boilerplate and tag latest:

docker build . -t node-server:latest

Run a Docker container with the previous built image and expose port 3000:

docker run -d -p 3000:3000 node-server:latest

๐Ÿ” Linting

To enable linting, you need to have NodeJS and NPM installed. Then install all dependencies and use the lint script as follows:

npm install
npm run lint

โš™๏ธ Environment Variables

Create a file .env and put all env vars there. (Copy the .env.template file). Inside the docker-compose.yml you can specify those env vars too.

โ˜๏ธ Hints

If a permission error for the build folder inside the docker container occurs, try to remove the image and container fully and build again.

Features

About

๐Ÿ˜‹ Boilerplate for a backend application featuring NodeJS, TypeScript, Express, Postgres SQL, Docker

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published