Running node.js code just displays a node identifier

前端 未结 9 2125
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-19 19:07

I have the following code in a file called server.js.

var http = require(\'http\');

http.createServer(function (request, response) {
  response.writeHead(200,          


        
9条回答
  •  梦谈多话
    2021-02-19 19:51

    Don't break your Harvest SCM by removing it from path. Try this one, open your windows command line (cmd) and then pass the following nodejs batch file so that it will set your command line to nodejs environment. Enjoy the node commands there.

    C:> "C:\Program Files\nodejs\nodevars.bat"

提交回复
热议问题