Multicolour is config driven, it’s not a library or a framework but a tool that links all your favourite libraries together to make a restful API.
The config can seem a bit convoluted if all kept in one file and this is why it’s a
.js file and not a
config.js might look something like the below and it configures:
- a default timeout on the server of 30 seconds
- the pagination results limit of 20
- a prefix on the API routes of
- Where the server should list and on what port, etc (standard Hapi config)
- and two database connections, one for when
NODE_ENV is development and for production.
A full config file may contain any of the following options: