Express JS(Part 02)
How To Setup And Configure?
As the very first step, we need to install the express-generator module on the system.
As the next step create new express project using newly installed express generator .
For example, now you can try printing hello world in your project.
Try An Example To Print "Hello World"
- In this image the first line has imported the express to our file
So that we have access to it through the variable 'express'.. app get. route, callback) function provides the information when a get request at given route is called.( res send. ) method is taking an object as input and it sends the hello world to the requesting client.( app listen. port, [host], [backlog], [callback]]) function binds and listening to the connections of the specific host and the port.(
Comments
Post a Comment