Browse Source

Updates done over time while in prod.

master
Gisle Aune 5 years ago
parent
commit
3adb5cd295
  1. 9
      index.js
  2. 4
      run.sh
  3. 1
      www-root/index.html

9
index.js

@ -5,13 +5,20 @@ var express = require('express');
var morgan = require('morgan')
var ngn4 = require('ngn4');
var config = require('./config.json');
var config = {port: 8080}
var util = require('./util.js');
var scriptMethods = {};
var app = express();
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('cookie-parser')());
app.use(morgan('combined', {stream: accessLogStream}));

4
run.sh

@ -1,4 +0,0 @@
sudo kill `cat /tmp/server-main.pid` 2>/dev/null
sudo node . &
echo $! >/tmp/server-main.pid

1
www-root/index.html

@ -5,6 +5,7 @@
<link rel="stylesheet" href="css/main.css" />
<meta charset="utf-8" />
<meta name="HandheldFriendly" content="true"/>
<meta name="theme-color" content="#000000">
<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">

Loading…
Cancel
Save