steedos-platform/packages/router
2024-08-21 08:06:03 +00:00
..
src
package.json action: release 2.7.6 2024-08-21 08:06:03 +00:00
README.md
tsconfig.json

@steedos/router

staticRouter

提供 express.Router() 单例

使用方式

const SteedosRouter = require('@steedos/router');
const router = SteedosRouter.staticRouter();
router.get('/service/api/apps/menus', async function (req: any, res: any) {
    ...
    res.status(200).send({ok: 1});
});
exports.default = router;