How to run server written in js with Node.js

前端 未结 6 1268
梦毁少年i
梦毁少年i 2020-12-24 12:33

I have installed node.js from here http://nodejs.org/ . in my windows8 machine. copied the example server code in my server.js file

var http = require(\'ht         


        
6条回答
  •  情话喂你
    2020-12-24 13:02

    You don't need to go in node.js prompt, you just need to use standard command promt and write

    node c:/node/server.js
    

    this also works:

    node c:\node\server.js
    

    and then in your browser:

    http://localhost:1337
    

提交回复
热议问题