在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:senecajs/seneca-web-adapter-koa2开源软件地址:https://github.com/senecajs/seneca-web-adapter-koa2开源编程语言:JavaScript 100.0%开源软件介绍:seneca-web-adapter-koa2
This is an adapter for seneca-web using koa/koa-routes. InstallationPeer dependencies have been specified for
UsagePlease refer to the seneca-web documentation on how to load routes. You can require this module as the adapter when using the SenecaWeb plugin const Seneca = require('seneca')
const SenecaWeb = require('seneca-web')
const Koa = require('koa')
const Router = require('koa-router')
const app = Koa()
const seneca = Seneca()
seneca.use(SenecaWeb, {
context: Router(),
adapter: require('seneca-web-adapter-koa2')
})
seneca.ready(() => {
app.use(
seneca
.export('web/context')()
.routes()
)
}) NoteMost of the seneca-web documents refer to passing the application as the ContributingThe Senecajs org encourage open participation. If you feel you can help in any way, be it with documentation, examples, extra testing, or new features please get in touch. LicenseCopyright (c) 2016-2017, Tyler Waters. Licensed under MIT. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论