Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kasvith/express-mongo-jwt-boilerplate
Express Mongo JsonWebToken boilerplate
https://github.com/kasvith/express-mongo-jwt-boilerplate
api auth boilerplate boilerplate-template boilerplates express expressjs hacktoberfest jwt jwt-authentication jwt-token mongo mongodb mongoose mongoosejs node nodejs passport
Last synced: 24 days ago
JSON representation
Express Mongo JsonWebToken boilerplate
- Host: GitHub
- URL: https://github.com/kasvith/express-mongo-jwt-boilerplate
- Owner: kasvith
- Created: 2018-02-20T19:46:24.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T20:31:22.000Z (almost 2 years ago)
- Last Synced: 2024-10-11T05:43:02.466Z (29 days ago)
- Topics: api, auth, boilerplate, boilerplate-template, boilerplates, express, expressjs, hacktoberfest, jwt, jwt-authentication, jwt-token, mongo, mongodb, mongoose, mongoosejs, node, nodejs, passport
- Language: JavaScript
- Homepage:
- Size: 329 KB
- Stars: 103
- Watchers: 8
- Forks: 43
- Open Issues: 30
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Express Mongo JWT Boilerplate [![Build Status](https://travis-ci.org/kasvith/express-mongo-jwt-boilerplate.svg?branch=master)](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 | "dev", "prod", "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 |