Skip to content
This repository was archived by the owner on Sep 15, 2021. It is now read-only.

Commit 87c4713

Browse files
committed
make hosting scanjs web ui a stackato task. this changes server.js to host "client/" instead of "."
1 parent 8444ed5 commit 87c4713

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

server.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
var static = require("node-static");
2-
var file = new static.Server('.', {
2+
var file = new static.Server('./client', {
33
headers: {
44
"Content-Security-Policy": "default-src 'self'; object-src 'none'; img-src 'self' data:; script-src 'self' 'unsafe-eval'",
55
}
66
});
77

8+
const PORT = process.env.PORT || 4000;
89
require ('http').createServer(function (req, res) {
910
req.addListener('end', function () {
1011
file.serve(req, res);
1112
}).resume();
12-
}).listen(4000);
13+
}).listen(PORT);
1314

14-
console.log("> node-static is listening on http://127.0.0.1:4000");
15+
console.log("> node-static is listening on http://127.0.0.1:"+PORT);

stackato.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: ScanJS
2+
framework:
3+
type: node
4+
runtime: node010
5+
6+
url:
7+
- scanjs.paas.allizom.org
8+
9+
processes:
10+
web: node server.js

0 commit comments

Comments
 (0)