- UNDER DEVELOPMENT
Node.js with Express and Mongoose written with TypeScript for provide a application end-to-end starter with best practices for API development.
- Have Git, Docker and docker-compose installed:
Installing Docker and docker-compose
- In a directory of your choice, clone the repository:
git clone https://github.com/vivaldomp/nodejs-express-mongoose-ts-starter.git
- create an .env file in the project root to provide the environment variables for the proper configuration of the containers. Example:
MONGO_HOST=localhost
MONGO_ROOT_USERNAME=root
MONGO_ROOT_PASSWORD=rootpass
MONGO_DBNAME=customer
MONGO_EXPRESS_USER=express
MONGO_EXPRESS_PASSWORD=express
- from the directory where the docker-compose.local.yml file is, type:
npm run stack:up
If everything is configured according to the steps above the containers will be running and the mongodb will already be populated.
You can explore mongodb content through mongo-express. To do this with docker-compose up working, navigate to http://localhost:8081
- for mongo express login:
user: express
password: express
You can access the APIs documentation at http://localhost:3000/api/