Skip to content

Instantly share code, notes, and snippets.

View harrisonmalone's full-sized avatar

Harrison Malone harrisonmalone

View GitHub Profile
const express = require('express');
const users = require('./users');
const app = express();
const PORT = process.env.PORT || 5000
const authenticate = ({ username, password }) => {
const user = users.find((user) => {
return user.username === username
})
const express = require('express');
const morgan = require('morgan');
const path = require('path');
// makes an instance of an express app
const app = express();
// what is a port
const PORT = 5000;

Project 1

Objective: Build a CodePen.io app that is functionally similar to this: https://codepen.io/freeCodeCamp/full/wGqEga/. Fulfill the below user stories. Use whichever libraries or APIs you need. Give it your own personal style. User Story: I can search Wikipedia entries in a search box and see the resulting Wikipedia entries. User Story: I can click a button to see a random Wikipedia entry. Hint #1: Here's a URL you can use to get a random Wikipedia article: https://en.wikipedia.org/wiki/Special:Random. Hint #2: Here's an entry on using Wikipedia's API: https://www.mediawiki.org/wiki/API:Main_page. Hint #3: Use this link to experiment with Wikipedia's API.

Project 2

@harrisonmalone
harrisonmalone / index.html
Last active September 17, 2019 06:21
code from promise.all lecture
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<script src="./index.js"></script>
@harrisonmalone
harrisonmalone / index.html
Last active September 17, 2019 06:21
code from what is a promise lecture
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js"></script>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=`, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="style.css">
</head>
<body>

1

saving our work to git

git add .

git commit -m "a message"
# 1. Make two variables called name and age. Assign them values, e.g. name = "bob" age = 20. Use string interpolation to print "My name is Bob and I am 20 years old".
# string
name = "Bob"
# integer
age = 20
# p "My name is #{name} and I am #{age} years old"
# 1. p
# 1. Make two variables called name and age. Assign them values, e.g. name = "bob" age = 20. Use string interpolation to print "My name is Bob and I am 20 years old".
# string
name = "Bob"
# integer
age = 20
p "My name is #{name} and I am #{age} years old"
# 1. p