diff --git a/api/now.js b/api/now.js index 085cc0c1e..faed5adde 100644 --- a/api/now.js +++ b/api/now.js @@ -1,10 +1,10 @@ const config = require('../lib/config'); -const app = require('../lib/app'); - config.set({ - noLogFiles: true, + NO_LOGFILES: true, }); +const app = require('../lib/app'); + module.exports = (req, res) => { app.callback()(req, res); }; diff --git a/lib/config.js b/lib/config.js index cd220bff1..bd3d65277 100644 --- a/lib/config.js +++ b/lib/config.js @@ -25,7 +25,7 @@ const calculateValue = () => { } value = { - isPackage: false, + isPackage: envs.IS_PACKAGE, noLogfiles: envs.NO_LOGFILES, connect: { port: envs.PORT || 1200, // 监听端口 diff --git a/lib/pkg.js b/lib/pkg.js index 89edbd2df..f0eed96b4 100644 --- a/lib/pkg.js +++ b/lib/pkg.js @@ -6,7 +6,7 @@ module.exports = { config.set( Object.assign( { - isPackage: true, + IS_PACKAGE: true, }, conf )