From 5e2c94143bf7c5c0fdf609cd89a8ce86dd142c6d Mon Sep 17 00:00:00 2001 From: wchen Date: Thu, 24 Nov 2016 14:09:10 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=A2=9E=E5=8A=A0=20PORT=20=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E5=8F=98=E9=87=8F=E7=9A=84=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .leanignore | 4 ++++ server.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 .leanignore 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);