Giter Site home page Giter Site logo

m4-2-node--url-params's Introduction

4-2 Node.Js: URL Params Workshop

Setup

There are many ways to set up a full-stack development environment. For the Node module, we will follow this set up provided in this repository.

This repository contains a frontend and a backend folder. This means that each folder is contains a complete environment (package.json, /node_modules) and are completely independent. You cannot reference code from one environment in the other environment.

Generally speaking, the frontend will query the backend via calls to the server endpoints.

File Structure

├── __lecture
├── __workshop
├── backend
    ├── node_modules (where all external dependencies are saved)
    |   ├── ...
    |   └── ...
    ├── server.js
    └── yarn.lock ("locks" the dependency versions)
├── frontend
    ├── public
    ├── src
    ├── node_modules (where all external dependencies are saved)
    |   ├── ...
    |   └── ...
    ├── package.json (where we keep a record of the app setup)
    └── yarn.lock ("locks" the dependency versions)
├── .gitignore
├── .prettierrc
└── README.md (this file)

The Frontend

  1. Open a terminal in VS Code
  2. Type cd frontend
  3. Type yarn install

Use yarn dev:frontend to start the frontend dev environment.

The Backend

  1. Open another terminal in VS Code
  2. Type cd backend
  3. Type yarn install

Use yarn dev:backend to start the backend dev environment.


Workshop

Building out the Backend

For this part of the workshop, you won't use the frontend at all. Follow the instructions, and once you finish exercise 6, you will have a functioning backend that will just work with the frontend.

Exercise 1 - Fix the backend

⚠️ Before you start the exercises, you will have to fix the server, I think. Somehow, things got a little "corrupted" and it won't run until the bugs are squashed.

Exercise 2 - /top50 endpoint

Open this exercise file: exercise-2.md

Exercise 3 - GETting a specific song

Open this exercise file: exercise-3.md

Exercise 4 - GETting songs by a specific artist

Open this exercise file: exercise-4.md

Exercise 5 - The Most popular artist is...

Open this exercise file: exercise-5.md

Exercise 6 - Array of Artists

Open this exercise file: exercise-6.md


🟡 - Minimally complete workshop (75%) - 🟡

Upgrading the Frontend

If you start up the FE and go to http://localhost:3000, you should have a functional app. It still needs a little love, but overall it should work.

This is what you see on the homepage.

homepage

Take a look through the frontend folder at the all of the code that is already written. Most of it should be familiar to you except for the useEffect hook. We will be learning about that in module 5. For now, it is sufficient to note that useEffect is where the data is getting fetched from the backend.

There are still a few components to create to get a fully functional site.

Exercise 7 - Render the top 50 songs

Open this exercise file: exercise-7.md

Exercise 8 - Render the songs by the most popular artist

Open this exercise file: exercise-8.md

Exercise 9 - Render the songs on each artist's page

Open this exercise file: exercise-9.md


🟢 - Complete workshop (100%) - 🟢

m4-2-node--url-params's People

Contributors

harrisrobin avatar anawestcott avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.