I am trying to set up nodejs with atom on ubuntu 16.10. I followed the steps given in this link. But when I edit the ~/.atom/config.cson file to
runner:
scopes:
js:”nodejs”
as given in the link, Atom gives an error
Unexpected new line after runner:
How do I get this correct?
EDIT
After using Dan Lowe's code, the atom error disappeared but the code doesnt compile.
#!/usr/bin/env nodejs
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(8080, 'localhost');
console.log('Server running at http://localhost:8080/');
It gives the error
./server.js: line 3: syntax error near unexpected token `('
./server.js: line 3: `var http = require('http');'
Is it not able to see nodejs?