2024 02 26 - TheEvergreenStateCollege/upper-division-cs-23-24 GitHub Wiki

Week 08 - Monday

26 Feb 2024

Back to web-24wi

Web Infra

09:50 - 10:00 Seating

  • Find your final project teammates and sit next to them.
  • Otherwise, find your data center partner from the disaster exercise and sit next to them.

10:00 - 10:15 Review and Roadmap

  • Infrastructure from the beginning
    • we provisioned an AWS server with an IP address
    • we created a DB schema and validated / formatted it, generated a JS client, and migrated it to
  • Our Goal: provide well-defined UI / API hosting, or knowledge-sharing for our teammates
    • Need a database schema (a User table / model should be present
    • Design a JSON API

10:15 - 11:00 Reminder of Data Center Disaster

  • Bring up all your AWS servers up to feature parity

11:10 - 12:00 Example

  • We'll mob program a U.S. cities example, then you will design your own data schema and JSON API for your final project.
  • Continue our D3 Map from Last Time
    • What does D3 stand for?
    • What does it do?
    • How does it depend on an API and/or database?

Data Schema and API Example

In your final project directory

<REPO_ROOT>/web-24wi/projects/<YOUR_PROJECT_NAME>/

Data Schema

If you don't have a data schema yet, run

npx prisma init

If you already have a Prisma schema, don't worry, it won't overwrite it.

In your prisma/schema.prisma file, begin constructing with your partner an example schema for your final project. User must be one of the models. You can change this later, this exercise is just to get started.

This is the example for the U.S. Cities, yours will look different according to your judgment.

image

API Server Route Handlers

In your server.js example, begin constructing Express route handlers. This is the example for the U.S. Cities, yours will look different according to your judgment.

image image

REST Commands

You can test your API with curl commands like the following

image image image image
⚠️ **GitHub.com Fallback** ⚠️