Salve sono nuovo(forum e su node.js)seguendo il tutorial sul sito ho creato il primo "programmino" in node js
eseguo con node path_to_file/first_app.js e mi restituisce questo sullacodice:var http = require('http'); var server = http.createServer(function(req,res){ res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('First app'); } server.listen(1337, '127.0.0.1'); console.log('Server running at http://127.0.0.1:1337/');
chiamata server.listen(1337, '127.0.0.1');:
codice:>SyntaxError: Unexpected identifier at Object.exports.createScript (vm.js:44:10) at REPLServer.defaultEval (repl.js:117:23) at bound (domain.js:254:14) at REPLServer.runBound [as eval] (domain.js:267:12) at REPLServer.<anonymous> (repl.js:279:12) at REPLServer.emit (events.js:107:17) at REPLServer.Interface._onLine (readline.js:214:10) at REPLServer.Interface._line (readline.js:553:8) at REPLServer.Interface._ttyWrite (readline.js:830:14) at ReadStream.onkeypress (readline.js:109:10) >

Rispondi quotando

