Griffin's Dev Diaries - TheEvergreenStateCollege/upper-division-cs-23-24 GitHub Wiki

Griffin's Dev Diaries:

AI:

SC:

Griffin's Dev Diary 01:

3/12/24

  • goal: create user profile page that reads json objects, and outputs profile entries like below:

image

For my project I am replacing latitude and longitude with username and the time/day when the user was created. Also I am adding a button to change password.

Screen Shot 2024-03-12 at 11 49 19 AM

-I need a fetch function to call the get method when the route "/api/profile" -For this I will need a route in router.ts. For example: router.get("/api/profile")... -I need to pass the fetch function my token. How do I access the token? It is in the req.authorization.header field?

The route should respond with a json object like: { "username": "user", "createdAt": "date/time" } I can use profileData = await response.json() to parse JSON