mirror of
https://github.com/YMFE/yapi.git
synced 2025-03-25 14:40:25 +08:00
自动化测试时服务端测试node默认2分钟没有返回就直接断掉连接,可以手动设置一个超时时间。
This commit is contained in:
parent
376473619b
commit
de23caa3b8
@ -1,6 +1,7 @@
|
||||
{
|
||||
"port": "3000",
|
||||
"adminAccount": "admin@admin.com",
|
||||
"timeout":120000,
|
||||
"db": {
|
||||
"servername": "127.0.0.1",
|
||||
"DATABASE": "yapi",
|
||||
|
@ -54,9 +54,14 @@ app.use(async (ctx, next) => {
|
||||
await next();
|
||||
});
|
||||
|
||||
|
||||
app.use(koaStatic(yapi.path.join(yapi.WEBROOT, 'static'), { index: indexFile, gzip: true }));
|
||||
|
||||
app.listen(yapi.WEBCONFIG.port);
|
||||
|
||||
const server = app.listen(yapi.WEBCONFIG.port);
|
||||
|
||||
server.setTimeout(yapi.WEBCONFIG.timeout);
|
||||
|
||||
commons.log(
|
||||
`服务已启动,请打开下面链接访问: \nhttp://127.0.0.1${
|
||||
yapi.WEBCONFIG.port == '80' ? '' : ':' + yapi.WEBCONFIG.port
|
||||
|
Loading…
x
Reference in New Issue
Block a user