Anand Rajput
Anand Rajput

Reputation: 479

Creating Your First Http Server in Node JS

So guys, am pretty new to node but have covered some ground. I created my first "example" server from this tutorial but don't understand a few things. Can anyone explain to me what this

 '/' 
in this line does or point me to some docs?

app.get('/', (request, response) => { 

Upvotes: 0

Views: 71

Answers (1)

eulloa
eulloa

Reputation: 252

The '/' represents the 'root' route of the application, in other words, the home page.

Contrast that with a '/login' route for example. This particular route would send users to mysite.com/login.

Read more about routing in ExpressJS here.

Upvotes: 1

Related Questions