I'm trying to run NodeJS on my school computer, and all it has is java, so I'm trying to find a way to run it. The closest I've come is Trireme, but it generates the following errors:
missing ; before statement
missing ; before statement
at module.js:439:0
at module.js:474:0
at module.js:356:0
at module.js:312:0
at module.js:364:0
at require (module.js:380:0)
at index.js:6:0
at module.js:456:0
at module.js:474:0
at module.js:356:0
at module.js:312:0
at module.js:497:0
at startup (trireme.js:142:0)
at trireme.js:923:0
I'm running trireme with java -jar trireme.jar index.js
, and the NodeJS code is
const fs = require('fs');
const express = require('express');
const app = express();
const http = require('http');
const server = http.createServer(app);
const { Server } = require('socket.io');
const io = new Server(server);
app.set('view engine', 'pug');
app.set('views', __dirname + '/templates');
server.listen(3000, () => {
console.log('listening on *:3000');
});
require('./routes.js')(app, fs);
require('./io.js')(io, fs);
It almost works, but not quite. I don't know how to fix these bugs though.