Ben bir dilenci olduğumu söylemeye gerek yok (Muhtemelen sorumu gördüğünüzde anlayacaktır).ReferenceError "tanımlı değil"
Ben kodu (aşağıda) bir http sunucusu oluşturmaktır düğümü yüklü
şimdi> `var http = require('http'),
host = '127.0.0.1',
port = '9000' ;
var server = http.createServer(function(req, res){
res.writeHead(200, {'Content-Type' :'text/html'}) ;
res.end ('<h1> Hello World Joseph </h1>') ;
}) .listen(port, host, function() {
console.log ('server Running on http://")' + host + ':' + port)
}) <
`
, ben düğüm komut istemine gidin hello.js adlı bir dosyada bu kodu var ve yazın hello.js
Ben
ReferenceError: hello is not defined
at repl:1:1
at REPLServer.defaultEval (repl.js:262:27)
at bound (domain.js:287:14)
at REPLServer.runBound [as eval] (domain.js:300:12)
at REPLServer.<anonymous> (repl.js:431:12)
at emitOne (events.js:82:20)
at REPLServer.emit (events.js:169:7)
at REPLServer.Interface._onLine (readline.js:211:10)
at REPLServer.Interface._line (readline.js:550:8)
at REPLServer.Interface._ttyWrite (readline.js:827:14)
Herhangi bir yardım son derece takdir edilecektir aşağıdaki olsun.
Teşekkür Joseph
'node hello.js' türünde '<' and '>' ifadesini kullandığınızı varsayalım aslında – JordanHendrix
kodunuzda' '' '' '' başlangıçta ve sonunda da orada olmamalıdır. – saadq