diff --git a/.leanignore b/.leanignore new file mode 100644 index 0000000..05769c3 --- /dev/null +++ b/.leanignore @@ -0,0 +1,4 @@ +.git/ +.avoscloud/ +.leancloud/ +node_modules/ \ No newline at end of file diff --git a/server.js b/server.js index a2d416e..8b16da7 100644 --- a/server.js +++ b/server.js @@ -14,7 +14,7 @@ var app = require('./app'); // 端口一定要从环境变量 `LEANCLOUD_APP_PORT` 中获取。 // LeanEngine 运行时会分配端口并赋值到该变量。 -var PORT = parseInt(process.env.LEANCLOUD_APP_PORT || 3000); +var PORT = parseInt(process.env.LEANCLOUD_APP_PORT || process.env.PORT || 3000); app.listen(PORT, function () { console.log('Node app is running, port:', PORT);