In this project, you’ll build a small web app that serves and updates information about your
world.json file (from the previous assignment) through an Express.js server. Your front end will
fetch and display data from the server, allow user interaction, and send updates back to the backend.
The server will evolve or update the “world” based on user input and respond with the new state.
You will host your project as a "Web Service" on render.com (using the free hobby tier).
08-server-world/
│
├── public/
│ ├── index.html
│ └── script.js
│
├── world.json
└── server.js
In week 1 you will first set up your project and display data from your world.json file on the front
end through an Express server. Next, you will create a way for users to make a simple update to that world (for
example, adding a person, changing an item, or modifying a number).
server.js file that:
public directory.GET /world route that sends the contents of world.json from the server.POST /update route that reads the existing world.json, modifies it
based on the client request, writes it back to disk, and sends the updated data as the response.
index.html and script.js):
/world on load and display the world information dynamically (i.e. generate HTML
code for the data).FormData pattern to create a JSON object from the inputs.fetch('/update', { method: 'POST', ... }) to send the
new information.Host your project as a "Web Service" on render.com (using the free hobby tier). The best way to do this is to register to render.com using your github account, and then to give render access to the class respository. Once you have depoyed your project render.com will give you a link to your project. Post that link next to your name in the spreadsheet sent to you via email.