Updates done over time while in prod.
This commit is contained in:
@@ -5,13 +5,20 @@ var express = require('express');
|
|||||||
var morgan = require('morgan')
|
var morgan = require('morgan')
|
||||||
var ngn4 = require('ngn4');
|
var ngn4 = require('ngn4');
|
||||||
|
|
||||||
var config = require('./config.json');
|
var config = {port: 8080}
|
||||||
var util = require('./util.js');
|
var util = require('./util.js');
|
||||||
var scriptMethods = {};
|
var scriptMethods = {};
|
||||||
|
|
||||||
var app = express();
|
var app = express();
|
||||||
var accessLogStream = fs.createWriteStream(__dirname + '/access.log', {flags: 'a'});
|
var accessLogStream = fs.createWriteStream(__dirname + '/access.log', {flags: 'a'});
|
||||||
|
|
||||||
|
try {
|
||||||
|
config = require("./config.json");
|
||||||
|
} catch(err) {
|
||||||
|
console.error("Couldn't load config, using defaults.");
|
||||||
|
console.error(JSON.stringify(config), ' ', 4);
|
||||||
|
}
|
||||||
|
|
||||||
app.use(require('compression')());
|
app.use(require('compression')());
|
||||||
app.use(require('cookie-parser')());
|
app.use(require('cookie-parser')());
|
||||||
app.use(morgan('combined', {stream: accessLogStream}));
|
app.use(morgan('combined', {stream: accessLogStream}));
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
sudo kill `cat /tmp/server-main.pid` 2>/dev/null
|
|
||||||
sudo node . &
|
|
||||||
|
|
||||||
echo $! >/tmp/server-main.pid
|
|
||||||
@@ -5,6 +5,7 @@
|
|||||||
<link rel="stylesheet" href="css/main.css" />
|
<link rel="stylesheet" href="css/main.css" />
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="HandheldFriendly" content="true"/>
|
<meta name="HandheldFriendly" content="true"/>
|
||||||
|
<meta name="theme-color" content="#000000">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta name="description" content="Name Generator for Mass Effect, Dragon Age and Elder Scrolls. It is fan-made, and the developer is not in any way affiliated with the developers and publishers behind those amazing franchises. Uses open-source name generator engine, ngn4">
|
<meta name="description" content="Name Generator for Mass Effect, Dragon Age and Elder Scrolls. It is fan-made, and the developer is not in any way affiliated with the developers and publishers behind those amazing franchises. Uses open-source name generator engine, ngn4">
|
||||||
<meta name="Description" content="Name Generator for Mass Effect, Dragon Age and Elder Scrolls. It is fan-made, and the developer is not in any way affiliated with the developers and publishers behind those amazing franchises. Uses open-source name generator engine, ngn4">
|
<meta name="Description" content="Name Generator for Mass Effect, Dragon Age and Elder Scrolls. It is fan-made, and the developer is not in any way affiliated with the developers and publishers behind those amazing franchises. Uses open-source name generator engine, ngn4">
|
||||||
|
|||||||
Reference in New Issue
Block a user