mirror of
https://github.com/turt2live/matrix-dimension.git
synced 2024-07-01 00:31:23 +00:00
Use nodejs 8 in travis; Update web start script
This commit is contained in:
parent
f37a70b7d8
commit
7956f03f0e
|
@ -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:
|
||||
|
|
|
@ -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
17
app.js
|
@ -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));
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue
Block a user