URL
stands for Uniform Resource Locator
.
URL is an address of a resource on the internet.
http://www.example.com:80/user?ref=Sam http // protocol/scheme www.example.com // domain name 80 // port /user // path ? // query ref=Sam // parameter
URI
vs URL
URI
(identify
) and URL
(locate
).
URL
is a URI
, but every URI
s are not URL
s.route
Routing refers to how an application’s endpoints (URIs) respond to client requests
.
You define routing
using methods of the Express
app object that correspond to HTTP methods
.
Trailing slash makes route a different URL.
# two different routes /api/service_name /api/service_name/
Trailing slash potentially leads to 307 Temporary Redirect
error.