Unverified Commit 98a57d04 authored by sean1025's avatar sean1025 Committed by GitHub

Merge pull request #1675 from liugddx/master

自动化测试时服务端测试node默认2分钟没有返回就直接断掉连接,可以手动设置一个超时时间。
parents ed1b9f3f de23caa3
{
"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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment