node-version-api
v1.1.0
Published
add /version api for server
Downloads
4
Readme
version
add /version api for server
usage
// for toa koa2 express
var pkg = require('../package')
var versionMw = require('node-version-api')(pkg)
app.use(versionMw)
// for koa1
var versionMw = require('node-version-api').koa1(pkg)
app.use(versionMw)
/version
{
name: pkg.name,
version: pkg.version,
startTime: 服务启动时间,
buildTime: process.env.BUILD_TIME,
buildCommit: process.env.BUILD_COMMIT
}
test
npm test