Added test server

Run npm start for demo on localhost
This commit is contained in:
Kristofer
2018-01-01 14:57:29 +01:00
parent 290c42d65e
commit 81b0dd3915
3 changed files with 3383 additions and 1 deletions

3367
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -10,6 +10,7 @@
"scripts": {
"prebuild": "grunt clean:build",
"build": "grunt build",
"start": "npx nodemon utils/server.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
@@ -27,11 +28,13 @@
},
"homepage": "https://github.com/kriffe/litegraph.js#readme",
"devDependencies": {
"express": "^4.16.2",
"google-closure-compiler": "^20171112.0.0",
"grunt": "^1.0.1",
"grunt-closure-tools": "^1.0.0",
"grunt-contrib-clean": "^1.1.0",
"grunt-contrib-concat": "^1.0.1",
"grunt-contrib-copy": "^1.0.0"
"grunt-contrib-copy": "^1.0.0",
"nodemon": "^1.14.7"
}
}

12
utils/server.js Normal file
View File

@@ -0,0 +1,12 @@
const express = require('express')
const app = express()
// app.get('/hello', (req, res) => res.send('Hello World!'))
app.use('/css', express.static('css'))
app.use('/src', express.static('src'))
app.use('/external', express.static('external'))
app.use('/demo', express.static('demo'))
app.use('/', express.static('demo'))
app.listen(80, () => console.log('Example app listening on port 80!'))