我在typescript对象中使用TypeOrm创建数据库连接:https://typeorm.io/#/connection-api。我直接使用连接API,而不是管理器。问题是,如果我第二次重新创建数据库连接,它将抛出一个异常: await createConnection(params);
AlreadyHasActiveConnectionError: Cannot create a new connection named "default", because connection with such name already exist and it now h
使用Express和Express路由器。我在一个目录中有几个文件,它们都实现了Express.Router。我动态地需要它们,添加一些中间件,然后将它们附加到一个“元”路由器上,最后调用app.use("/",MetaRouter)。 async function (req, res) {
res.json(await Bo