@tomrpc/mount
TypeScript icon, indicating that this package has built-in type declarations

2.0.3 • Public • Published

@tomrpc/mount

import mount from '@tomrpc/mount';


const rpc = createServer({
    base: import.meta.url,
    beforeOne: function (ctx: any, key: string) {
    console.log(ctx.path);
    console.log(ctx.method);
    console.log('beforeOne key=' + key);
  },
});

rpc.base = import.meta.url;
mount(rpc, './fn');

rpc.listen(3000);

Readme

Keywords

Package Sidebar

Install

npm i @tomrpc/mount

Weekly Downloads

0

Version

2.0.3

License

MIT

Unpacked Size

539 kB

Total Files

21

Last publish

Collaborators

  • langshu