config-routes
v0.1.9
Published
Configuration based routing for express, written in es6 compiled to es5
Downloads
9
Maintainers
Readme
##Example
Define steps for route in json format:
[ { "fn": "database/mongo/getRecords", "config": { "collection": "tblCustomers", "saveTo": "customerRecords" } }, { "fn": "output/res.send.final", "config": { "valueAt": "customerRecords" } } ]
Reads as:
Step 1, get (all) records for the tblCustomers collection and save the results to 'customerRecords' in the common state
Step 2, call res.send() with the data stored at 'customerRecords' in common state