Use nodejs 8 in travis; Update web start script

This commit is contained in:
Travis Ralston 2017-12-22 22:11:47 -07:00
parent f37a70b7d8
commit 7956f03f0e
4 changed files with 4 additions and 20 deletions

View file

@ -1,10 +1,11 @@
language: node_js
node_js:
- "6"
- "8"
env:
- NODE_ENV=development
before_install:
- npm i -g npm
- npm i -g typescript
install:
- npm install
script:

View file

@ -16,7 +16,7 @@ cp config/default.yaml config/development.yaml
nano config/development.yaml
# Run the webserver (it watches for changes)
npm run start:dev
npm run start:web
# Run the backend (does not watch for changes)
npm run build:app && node build/app/index.js

17
app.js
View file

@ -1,17 +0,0 @@
var log = require("./src/util/LogService");
var Dimension = require("./src/Dimension");
var DimensionStore = require("./src/storage/DimensionStore");
var DemoBot = require("./src/matrix/DemoBot");
var config = require("config");
log.info("app", "Bootstrapping Dimension...");
var db = new DimensionStore();
db.prepare().then(() => {
Dimension.start(db);
if (config.get("demobot.enabled")) {
log.info("app", "Demo bot enabled - starting up");
var bot = new DemoBot(config.get("demobot.homeserverUrl"), config.get("demobot.userId"), config.get("demobot.accessToken"));
bot.start();
}
}, err => log.error("app", err)).catch(err => log.error("app", err));

View file

@ -5,7 +5,7 @@
"main": "build/app/index.js",
"license": "GPL-3.0",
"scripts": {
"start:dev": "webpack-dev-server --inline --progress --port 8080 --host 0.0.0.0",
"start:web": "webpack-dev-server --inline --progress --port 8080 --host 0.0.0.0",
"start:app": "npm run-script build && node build/app/index.js",
"build": "rimraf build && npm run-script build:web && npm run-script build:app",
"build:web": "webpack --progress --profile --bail",