node.js 윈도우에서 실행하기...
Server Side/Node.js2016. 8. 7. 12:58
1. Download the appropriate(compatible with your windows) node.js from : http://nodejs.org/
2. Run the downloaded file.
3. After installing successfully let us run our first program.
Now create a file called as server.js place it in the folder where node.exe is placed.
server.js location:
Or Just Download the server.js file from here and place it in nodejs folder as in above image.
4. Now Open cmd.exe
5. Now run the following command :
“cd c:\path\to\the\node\executable” where node.exe exists.
For example my node.exe resides in the folder “C:\Program Files\nodejs>node”
6. Now Open your browser and access http://127.0.0.1:8125/ in the address bar. You will see the following message :
Hello Tutorialsplane!
참고 URL -
http://tutorialsplane.com/tag/how-to-install-nodejs-on-xampp-localhost/
2. Run the downloaded file.
3. After installing successfully let us run our first program.
Now create a file called as server.js place it in the folder where node.exe is placed.
server.js location:
c:\Program Files\nodejsServer.js file will contain :
var http = require('http'); http.createServer(function (request, response) { console.log('request starting...'); response.writeHead(200, { 'Content-Type': 'text/html' }); var html = 'Hello Tutorialsplane!
'; response.end(html, 'utf-8'); }).listen(8125); console.log('Server running at http://127.0.0.1:8125/');
Or Just Download the server.js file from here and place it in nodejs folder as in above image.
4. Now Open cmd.exe
5. Now run the following command :
“cd c:\path\to\the\node\executable” where node.exe exists.
For example my node.exe resides in the folder “C:\Program Files\nodejs>node”
C:\Program Files\nodejs>node server.js
6. Now Open your browser and access http://127.0.0.1:8125/ in the address bar. You will see the following message :
Hello Tutorialsplane!
참고 URL -
http://tutorialsplane.com/tag/how-to-install-nodejs-on-xampp-localhost/