@tomrpc/app
v2.0.3
Published
My Awesome lib
Downloads
2
Readme
@tomrpc/app
tom.json
{
name:'hi'
base: import.meta.url
static: 'public'
core: true
view: true
jwt: true
port: 3000
mount: './fn'
lifeCyle: {
},
debug: true
logLevel:
}
import app from '@tomrpc/app';
const rpc = createServer(cfg);
rpc.start();
jwt豁免
rpc.jwt(async (ctx, next) => {
// console.dir('view');
await next();
// if (['/', '/view', '/api*'].some((e) => ctx.path.match(e))) {
// await next();
// } else {
// ctx.body = { jwt: 'not jwt' };
// }
});