A simple toolbox to build your API without much magic.
TODO: ...
You could also use the utils directly, this is a toolbox not something opinionated on which you should be restrained.
- Install Node.js
- On the CLI, run
npm install -g typescript
(this will help with some modules) - On the CLI, on the project folder run
npm install --save toolbox-api
To run the documentation
npm run start-docs
default.json
is the first file imported and as per name has all the defaults of the application. After loading this file, the system will load the file with the name of the NODE_ENV
. If you have NODE_ENV=production
then production.json
will be loaded on top of the default configuration.
To setup a config, you should follow the instructions from node-config. When you initialize the config module, you can also pass an extension interface for the config.
For you to be able to add a new service follow these steps:
TODO: ...
TODO: ...
You shouldn't use console.*
because these can't be treated / parsed or go to a file for example. For this reason, a logger exists.
TODO: ...