some updates?
This commit is contained in:
1
.env
1
.env
@@ -1,2 +1,3 @@
|
|||||||
NODE_ENV="development"
|
NODE_ENV="development"
|
||||||
JWT_SECRET=kj3h45bl2k34jt23498570q9n8098354t7029358tyowie5uthw8475tyq98347ty834irhfoqi34uyt18
|
JWT_SECRET=kj3h45bl2k34jt23498570q9n8098354t7029358tyowie5uthw8475tyq98347ty834irhfoqi34uyt18
|
||||||
|
PORT=4000
|
||||||
10
bin/www
10
bin/www
@@ -4,7 +4,7 @@ var app = require("../app");
|
|||||||
var http = require("http");
|
var http = require("http");
|
||||||
|
|
||||||
// Define a port for the server to listen on
|
// Define a port for the server to listen on
|
||||||
var port = process.env.PORT || 4000;
|
var port = 4000;
|
||||||
app.set("port", port);
|
app.set("port", port);
|
||||||
|
|
||||||
// Create a server instance
|
// Create a server instance
|
||||||
@@ -17,16 +17,16 @@ server.listen(port);
|
|||||||
server.on("error", onError);
|
server.on("error", onError);
|
||||||
server.on("listening", onListening);
|
server.on("listening", onListening);
|
||||||
|
|
||||||
function pipeOrPort(address) {
|
/* function pipeOrPort(address) {
|
||||||
return typeof address == "string" ? `pipe ${address}` : `port ${address.port}`;
|
return typeof address == "string" ? `pipe ${address}` : `port ${address.port}`;
|
||||||
}
|
} */
|
||||||
|
|
||||||
function onError(error) {
|
function onError(error) {
|
||||||
if (error.syscall != "listen") {
|
if (error.syscall != "listen") {
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
|
||||||
let bind = pipeOrPort(server.address());
|
let bind = 4000;//pipeOrPort(server.address());
|
||||||
|
|
||||||
switch (error.code) {
|
switch (error.code) {
|
||||||
case "EACCES":
|
case "EACCES":
|
||||||
@@ -41,6 +41,6 @@ function onError(error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onListening() {
|
function onListening() {
|
||||||
let bind = pipeOrPort(server.address());
|
let bind = 4000;//pipeOrPort(server.address());
|
||||||
console.log(`Listening on ${bind}`);
|
console.log(`Listening on ${bind}`);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
"express-winston": "^4.0.2",
|
"express-winston": "^4.0.2",
|
||||||
"jsonwebtoken": "^8.5.1",
|
"jsonwebtoken": "^8.5.1",
|
||||||
"sequelize": "^5.21.3",
|
"sequelize": "^5.21.3",
|
||||||
"sqlite3": "^4.1.1",
|
"sqlite3": "^4.2.0",
|
||||||
"winston": "^3.2.1"
|
"winston": "^3.2.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user