dev-api: add developer portal, OpenAPI spec, and Flatenbadet case study
- New /developers/ page with API docs, SDKs, pricing, use cases - OpenAPI 3.0 spec for Orders, Missions, Photos, Analytics - Case study: Glasskiosken i Flatenbadet — complete ROI analysis - Updated /order/ with recurring missions and frequency dropdown
This commit is contained in:
+31
@@ -0,0 +1,31 @@
|
||||
// Run this to see how colouring works
|
||||
|
||||
const _prettyFactory = require('../../')
|
||||
const pino = require('pino')
|
||||
const { Writable } = require('readable-stream')
|
||||
|
||||
function prettyFactory () {
|
||||
return _prettyFactory({
|
||||
colorize: true
|
||||
})
|
||||
}
|
||||
|
||||
const pretty = prettyFactory()
|
||||
const formatted = pretty('this is not json\nit\'s just regular output\n')
|
||||
console.log(formatted)
|
||||
|
||||
const opts = {
|
||||
base: {
|
||||
hostname: 'localhost',
|
||||
pid: process.pid
|
||||
}
|
||||
}
|
||||
const log = pino(opts, new Writable({
|
||||
write (chunk, enc, cb) {
|
||||
const formatted = pretty(chunk.toString())
|
||||
console.log(formatted)
|
||||
cb()
|
||||
}
|
||||
}))
|
||||
|
||||
log.info('foobar')
|
||||
Reference in New Issue
Block a user