Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/blavikensbutcher/node-rest-api
Contact books w/ Express, MongoDb, Auth, Jwt, Email sending, Avatars, Favorites
https://github.com/blavikensbutcher/node-rest-api
email-sender express expressjs gravatar-api jwt-authentication mongodb
Last synced: 9 days ago
JSON representation
Contact books w/ Express, MongoDb, Auth, Jwt, Email sending, Avatars, Favorites
- Host: GitHub
- URL: https://github.com/blavikensbutcher/node-rest-api
- Owner: blavikensbutcher
- Created: 2024-03-26T13:25:53.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-05-03T15:34:13.000Z (9 months ago)
- Last Synced: 2024-11-10T17:08:23.420Z (2 months ago)
- Topics: email-sender, express, expressjs, gravatar-api, jwt-authentication, mongodb
- Language: JavaScript
- Homepage:
- Size: 180 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Node.js microservice template
This template has been created to develop microservices using Node.js with the same structure and default configuration.### Global variables
* `NODE_ENV` - application environment (usually `development` or `production`)
* `PORT` - the port that the server is listening to
* `MAIL_PASSWORD` - password for email service to send mails
* `MAIL_USER` - email user to send mails `("[email protected]")`### The scripts from package.json
`npm start` - to run server using node
`npm run dev` - to run server using nodemon### Docker
* To run docker container:
`docker run -p 8080:3000 -d service-name`### The structure of the template
**.env.example** - the example of the `.env` file that contains global variables of the service. `.env.example` should be without production data. Should be in GIT;
**.env** - the copied file of `.env.example` with real data of variables. Should be excluded from GIT;
**.gitignore** - patterns of files or folders to ignore checking git changes;
**server.js** - the file to start the service.
**package.json** - the main file of information, and configuration, and dependencies of the service;
**package-lock.json** - the file from `package.json` that contains all information about all node modules that were installed like dependencies and
devDependencies;