- Add 
/postcode/3021json response - Add 
sendHTML(response, mainHTML)function to utils.js sendHTML(response, `This is a paragraph
`) - Change the not found route to send back JSON instead of plain text, while still keeping the 404 status code — e.g. 
{ "error": "Page not found" } - Add 
/assets/main.cssroute with some simple CSS - Change 
sendHTML()to add a<link>to the main.css URL - (Advanced) Add an assets directory with an gif file inside. Serve that file at 
/assets/example.gifwith the correct content type. - (Advanced) Add a catch-all 
/postcode/(number)route, which reads a matching file in a postcodes directory. e.g./postcode/3040will read the file at/postcodes/3040.jsonin the project directory, and send it back. Otherwise, if no matching file is found, it will 404 
- 
                Notifications
    
You must be signed in to change notification settings  - Fork 1
 
Coder-Academy-Patterns/node-vanilla-http-server
Folders and files
| Name | Name | Last commit message  | Last commit date  | |
|---|---|---|---|---|
Repository files navigation
About
        No description, website, or topics provided.
      
    Resources
Stars
Watchers
Forks
Releases
No releases published
              Packages 0
        No packages published