January 2018
Beginner
658 pages
13h 10m
English
In order to create an app, all we have to do is call the method. Next to the variable app we can start setting up all of our HTTP route handlers. For example, if someone visits the root of the website we're going to want to send something back. Maybe it's some JSON data, maybe it's an HTML page.
We can register a handler using app.get function. This will let us set up a handler for an HTTP get request. There are two arguments we have to pass into app.get:
In our case we're looking for the root of the app. So we can just use forward slash ( ...
Read now
Unlock full access