blackboards
v0.1.0
Published
Blackboard framework
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 installRun the project
npm startRun the linter
npm run lintCommand to ask to the linter to fix the issue itself:
npm run lintFixRun the tests
We use jest to run the tests. To execute them in the project, run:
npm run testTo have the test coverage:
npm run test:coverageOther arguments: The complete list
npm run test -- --argumentToAddList 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
}