Node.js Hello World
This post is based on my personal experiences.
before I start posting, I assume that “NPM” is already installed. This post shows you, how to start node.js with “Hello World”
-
create “myapp” folder (mkdir myapp)
-
type “npm init”
-
install “express” (npm install express –save)
-
create js file(app.js)
-
type following codes
-
after writing codes, run node and execute your codes (node app.js)
-
you will see the final output on localhost:3000(default)