cogsworth-micro
a cogsworth microservice.
rad! 💯
usage
launch
start
routes
the following routes are supported:
// get /// get /:id// post /// put /:id// delete /:id
the payload of a schedule is:
// [brackets] imply the field is optional id: 'best_id' trigger: // at least one of the below must be provided cron: '* * * * * *' // pattern rrule: 'FREQ=SECONDLY' // pattern vevent: ` [DTSTART:2017-07-15T07:41:25.815Z] RRULE:FREQ=SECONDLY `
demo
node ./example.js
, from the micro source code
🛰 micro$ node examplejs koa:application use bodyParser +0ms koa:application use simpleResponses +2ms koa-route GET / -> /^?:\/?=$))?$/i +2ms koa:application use - +0ms koa-route GET /:id -> /^\/?:^\/+?))?:\/?=$))?$/i +0ms koa:application use - +0ms koa-route POST / -> /^?:\/?=$))?$/i +0ms koa:application use - +0ms koa-route PUT /:id -> /^\/?:^\/+?))?:\/?=$))?$/i +1ms koa:application use - +0ms koa-route DELETE /:id -> /^\/?:^\/+?))?:\/?=$))?$/i +0ms koa:application use - +0mslistening on port 8080 koa:application listen +3ms cogsworth:Scheduler scheduler state: STARTING +0ms cogsworth:Scheduler scheduler state: RUNNING +1ms