aboutsummaryrefslogtreecommitdiff
path: root/src/api/structures/Server.js
diff options
context:
space:
mode:
authorPitu <[email protected]>2019-03-02 02:08:11 +0900
committerPitu <[email protected]>2019-03-02 02:08:11 +0900
commit73d85e8c7938e1db30da3cc4354b143d4a078473 (patch)
tree168f25e4d4a6cff7cd21b07f8b3df417ab28ab9e /src/api/structures/Server.js
parentCreate pm2.md (diff)
downloadhost.fuwn.me-73d85e8c7938e1db30da3cc4354b143d4a078473.tar.xz
host.fuwn.me-73d85e8c7938e1db30da3cc4354b143d4a078473.zip
Enviroment variables parsing fix
Diffstat (limited to 'src/api/structures/Server.js')
-rw-r--r--src/api/structures/Server.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/api/structures/Server.js b/src/api/structures/Server.js
index d2cc2f1..0dd22d7 100644
--- a/src/api/structures/Server.js
+++ b/src/api/structures/Server.js
@@ -10,14 +10,14 @@ const jetpack = require('fs-jetpack');
const path = require('path');
const rateLimiter = new RateLimit({
- windowMs: process.env.RATE_LIMIT_WINDOW,
- max: process.env.RATE_LIMIT_MAX,
+ windowMs: parseInt(process.env.RATE_LIMIT_WINDOW, 10),
+ max: parseInt(process.env.RATE_LIMIT_MAX, 10),
delayMs: 0
});
class Server {
constructor() {
- this.port = process.env.SERVER_PORT;
+ this.port = parseInt(process.env.SERVER_PORT, 10);
this.server = express();
this.server.set('trust proxy', 1);
this.server.use(helmet());