0

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) => { 

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

@AnandRajput in that case, would you mind accepting the answer? Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.