https://github.com/webobite/nodeexpressboilerplate
A Boilerplate code for node and Express Js
https://github.com/webobite/nodeexpressboilerplate
Last synced: 11 months ago
JSON representation
A Boilerplate code for node and Express Js
- Host: GitHub
- URL: https://github.com/webobite/nodeexpressboilerplate
- Owner: webobite
- License: mit
- Created: 2020-12-05T15:48:29.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-12-05T18:56:45.000Z (over 5 years ago)
- Last Synced: 2025-04-12T04:37:45.958Z (about 1 year ago)
- Language: JavaScript
- Homepage: node-express-boilerplate.vercel.app
- Size: 17.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://gitpod.io/#https://github.com/webobite/nodeExpressBoilerplate)
[](https://badgen.net/badge/license/MIT/blue)
----------
# Node Express Boilerplate
A Boilerplate code for node and Express Js
----------
### SOME SETUP BEFORE RUNNING THE SERVER
- Create .env file in root directory
- Add the below code
`PORT=3000`
- install package with npm / yarn
- `npm install` or `yarn install`
- Run the server with below command
- `npm start`
----------
### HOW TO USE CUSTOM LOGGER IN YOUR CODE BASE ?
As you can navigate to file `logger/index.js` It contain a custom logger file which takes the type of Log and log message to show that log in the console.
#### To use custom logger
- import the logger function in your file.
- `const {logger} = require('./logger')`
- Pass the `type of log` along with `custom message in the log`
- Here `type of log` will be any one of the following :
- SUCCESS
- ERROR
- DEBUG
- Call the function like this : `logger('DEBUG', "Your Custom message")`
----------