wasm-server.js in prism-cli-0.0.1 vs wasm-server.js in prism-cli-0.0.2

- old
+ new

@@ -1,13 +1,16 @@ const http = require('http'); const fs = require('fs'); const path = require('path'); const proxy = http.createServer((req, res) => { - console.log(req.url); - const p = path.join('.', req.url); + let p = path.join('.', req.url); + if (req.url === '/') { + p = path.join('.', 'index.html'); + } + try { if (p.endsWith('.wasm')) { res.setHeader("Content-Type", "application/wasm") } if (p.endsWith('.js')) { @@ -18,6 +21,7 @@ res.write(e.toString()); } res.end(); }); -proxy.listen(1337, '127.0.0.1'); +proxy.listen(3042, '127.0.0.1'); +console.log("Listening on localhost:3042");