https://github.com/kasvith/typescript-express-jwt-mongo-boilerplate
Typescript Express JWT Mongo Boilerplate
https://github.com/kasvith/typescript-express-jwt-mongo-boilerplate
Last synced: about 1 year ago
JSON representation
Typescript Express JWT Mongo Boilerplate
- Host: GitHub
- URL: https://github.com/kasvith/typescript-express-jwt-mongo-boilerplate
- Owner: kasvith
- License: mit
- Created: 2021-02-25T11:08:25.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-02-25T18:33:45.000Z (over 5 years ago)
- Last Synced: 2025-02-04T08:44:18.446Z (over 1 year ago)
- Language: TypeScript
- Size: 87.9 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Express Mongo JWT Boilerplate [](https://travis-ci.org/kasvith/express-mongo-jwt-boilerplate)
## Installation
- Install NodeJS, MongoDB
- Install `npm` or `yarn`
- Rename `.env.example` to `.env`
- Fulfill `.env` data
- Start MongoDB
- Run `yarn run dev` or `npm run dev`
- Check `http://localhost:3000/api/status` to see it works
## With Docker
- Make sure you have installed `Docker` and `Docker Compose`
- Just run `docker-compose up` to start the server
## Configuration
| Name | Description | Example |
|----------------------|---------------------------------------------------------------------------------------|--------------------------------------|
| NODE_ENV | Environment for node js | "development", "production", "test" |
| APP | Name of the application | My cool express app |
| PORT | Port to run the application (if you run in **heroku** this will setup automatically) | 3000 |
| HOSTNAME | Host name for running the application | http://localhost:3000 |
| APP_SECRET | Secret for running app. Use a strong hash in production and make sure to rotate it | ddd36434-80fe-4f18-b3b6-e645697f7b84 |
| MONGOURI | MongoDB connection URI | mongodb://localhost:27017/yourapp |
| MONGOTESTURI | MongoDB connection URI for testing | mongodb://localhost:27017/test-app |
| TRANSPORTER_HOST | Mail server host | smtp.mymailer.com |
| TRANSPORTER_PORT | Mail server port | 2525 |
| TRANSPORTER_USERNAME | Mail server username | harrypotter |
| TRANSPORTER_PASSWORD | Mail server password | alohomora |