Skip to content

Express api sample with basic crud, passport.js login, jwt authentication docker setup, mongo db.

Notifications You must be signed in to change notification settings

stajics/express-sample-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sample express api

Features:

Installation

Must have docker installed.

Clone the repository and run the following commands under your project root:

Initialize containers:

docker build -t express-sample-api .
docker run -p 27017:27017 --name mongo TZ=Europe/Belgrade -d mongo:latest
docker run -p 3000:3000 -p 80:80 -v $(pwd):/usr/src --name express-sample-api -e TZ=Europe/Belgrade -e EXPRESS_SAMPLE_JWT_SECRET=jwtsecret -e NODE_ENV=development -e EXPRESS_SAMPLE_DB_URL=mongodb://172.17.0.1:27017 -e EXPRESS_SAMPLE_DB_NAME=express-sample-api -e EXPRESS_SAMPLE_TEST_DB_NAME=test -it express-sample-api bash
Server

If containers allready initialized:

docker start mongo express-sample-api

Connect to container:

docker exec -it express-sample-api bash

About

Express api sample with basic crud, passport.js login, jwt authentication docker setup, mongo db.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published