@abtnode/router-adapter 中文文档教程
@abtnode/router-adapter
blocklet 的中间件,使其适应 ABT 节点路由器。
const express = require('express');
const getRouterAdapter = require('@abtnode/router-adapter');
const app = express();
app.use(getRouterAdapter());
// or app.use(getRouterAdapter(customGetBaseUrl));
app.listen(4001, () => {
console.log('Server ready at http://localhost:4001/private?__st__=sometoken');
});
@abtnode/router-adapter
Middleware for blocklets to make it adaptive to ABT Node Router.
const express = require('express');
const getRouterAdapter = require('@abtnode/router-adapter');
const app = express();
app.use(getRouterAdapter());
// or app.use(getRouterAdapter(customGetBaseUrl));
app.listen(4001, () => {
console.log('Server ready at http://localhost:4001/private?__st__=sometoken');
});