HTTP is an extremely powerful tool that serves as one of the communication foundations of the modern web. It allows for communication between two entities over common transport protocols. By leveraging this robust communication ability, HTTP can be used to develop complex application architectures over networks, allowing servers to communicate with other servers, databases, and much more. Combining this with Node.js core modules such as
querystring, it has never been easier to build a complex application on the web.
Take a look at the workspace to the right. There is a complete server that processes HTTP requests to various resources. Think about how you could modify this server to add more features.
Here are some interesting ways you could modify the server:
- Add some additional headers to a response.
- Process the query parameters for the
GETrequests with the
querystringmodule instead of the
- Make a request to a database from within an endpoint.