blackboards
v0.1.0
Published
Blackboard framework
Downloads
2
Readme
express-es6
Sample of express server using ES6
The goal of this project is to have a sample of server using express and the ES6 synthax npm start to start the server
Run the project
npm install
Run the project
npm start
Run the linter
npm run lint
Command to ask to the linter to fix the issue itself:
npm run lintFix
Run the tests
We use jest to run the tests. To execute them in the project, run:
npm run test
To have the test coverage:
npm run test:coverage
Other arguments: The complete list
npm run test -- --argumentToAdd
List of the expect().toBe()
here
Log errors
We are using the winstom logger
How to use it?
const logger = require("../../logger");
logger.info('Error message', err)
The error message will be printed in the console and write into two files:
combined.log
: contains all the log typeerror.log
: contains only the error
You can replace info
in the previous code snippet by the following logging level:
{
error: 0,
warn: 1,
info: 2,
verbose: 3,
debug: 4,
silly: 5
}