To install package
npm i remer
start your api in debug mode.
DEBUG=true node src/server
remer will create a robust debugging information about your application.
write it in this format
debug excepts two params one for title and one for status.
status should be either success or fail if undefined terminal will output magenta title
remer.debug('title goes here', 'status');
success
: Denotes that the log is for a successful execution
warn
: Denotes that the log is for a potential errors in the future
fail
: Denotes that this log is reporting an error
This package has a version bumper feature. You can require it to be used to bump the current version stated in the package.json file.
Ther first parameter should be the version you want bumped up. The intent for this version bupmer is for the version of the package.json
file. You can single out the version
in the package.json using require()
. For example:
const version = require('./package.json');
This function bumps up the version based semantic versioning: MAJOR.MINOR.PATCH
This function takes 1 of 3 values as the second argument:
major
: bumps current version up 1 major version
minor
: bumps current version up 1 minor version
patch
: bumps current version up 1 patch version
Examples:
// create an instance of the version bumper
const versionBump = require('remer').versionBump;
const version = require('./package.json').version;
// package.json current version is 1.0.0
// bump up 1 major version
versionBump(version, 'major'); // returns 2.0.0
// bump up 1 major version
versionBump(version, 'minor'); // returns 1.1.0
// bump up 1 major version
versionBump(version, 'patch'); // returns 1.0.1
###Style Guide reference Airbnb
###Contributors View Contributors