Grokking Node.js
Vote

0% completed

​

Handling Routes and HTTP Methods in Express

A route is a rule that pairs an HTTP method with a URL path and names the function that answers matching requests. Every route in Express has the same form:

app.METHOD(PATH, HANDLER);

METHOD is an HTTP method written in lowercase, such as get, post, put or delete. PATH is the path to match, such as /users. HANDLER is the function that Express calls with req and res when both the method and the path match. When a request arrives, Express checks the routes in the order they were registered and calls the first handler whose method and path both match

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content