Skip to content

Instantly share code, notes, and snippets.

View harrisonmalone's full-sized avatar

Harrison Malone harrisonmalone

View GitHub Profile

Mini MERN Project

This is a chance to implement a full MERN stack app, and get some practice with all the pieces of technology we have used to date.

  • We are going to base the app around recipes (unless you have a strong feeling about what you’d like to do instead - but note that discussions about the structure of your data and various other elements will be more difficult if you go down this route).
  • If you are feeling confident, you are welcome to take this project off in any direction that you like, and start building something that you are interested in, as long as you use Node, Express, Mongo/Mongoose, and React.
  • But if you are keen on some direction, please follow these steps. We can run some review classes on each stage as needed later in the day.
  • If you don't understand what is going on in any of these steps, please ask. It is important to understand why you are taking these steps as you go. Come to the review classes as necessary.
  1. First think about how to arrange your data. This
import React from 'react';
import './App.css';
import Artists from './Artists'
class App extends React.Component {
// runs first
state = {
artists: []
}

Countries auth challenge

challenge #1

  • add authentication to your own countries react apps
  • protect all views, unless a user has logged in they can't view anything, implement what we did in the lecture
  • add a register page so users can create accounts
  • add a logout button on every view (destroy the localstorage token)

challenge #2 (optional)

  • create a "where have you been in the world" app

React router lecture

  • go through what we've done so far it's all been single page
  • build a blog
  • add browserrouter
  • go through different ways to use routes (start basic), order matters
  • show links
  • show redirect

React router challenge

  • create a new react app
@harrisonmalone
harrisonmalone / index.js
Last active June 20, 2019 01:49
middleware basics ☀️
const express = require('express');
const app = new express();
// middleware
const firstMiddleware = (req, res, next) => {
// a return in the middleware
// go to the next thing in the middleware chain
console.log('in first middleware')
next()
const fs = require('fs');
const parse = require('csv-parse');
const cleanData = (data) => {
data.splice(0, 1);
const result = {
rankings: []
}
data.forEach((athlete) => {
let newAthlete = {

Student management web app

This will be a pair programming challenge to build a student management web app with sinatra 👌.

The following features need to be implemented for the data structure:

  • Setup your fake database with an empty array of students
  • Add two student hashes to the array to start off with
students = [

Sinatra challenge

Create a portfolio sinatra app 🌈.

Part one

There needs to be 4 routes:

  • Homepage, route "/"
  • About page, route "/about"
  • Contact me page, route "/contact-me"

Full stack javascript project

Specs 🚀

  • A day and a half
  • Pair programming
  • 1 min demo wednesday afternoon
  • Choose your own project
  • Express and mongoose (mongodb) backend
  • HTML and CSS frontend (this will be replaced by react later in the course)