#100Devs - Node & Express Again

Class 39 of our Free Web Dev Bootcamp for folx affected by the pandemic. Join live T/Th 6:30pm ET leonnoel.com/twitch and ask questions here: leonnoel.com/discord

Skip to first slide
Slide 1 of 31

 

Node & Express Again

 

Leon Noel

#100Devs

I ain't know nothin' 'bout no Visa, I was in the park with the gang
Moms be feelin' bad, I try to tell her she is not to blame
No social security, couldn't get a license, but I still didn't complain


Slide 2 of 31

Agenda


Slide 3 of 31

Questions

About last class or life


Slide 4 of 31

Checking In

Like and Retweet the Tweet

!checkin


Slide 5 of 31

Live CAR Class

FRIDAY
6:00pm EST

And we are talking about the agency


Slide 6 of 31

Office Hours

SUNDAY
1:00pm EST


Slide 7 of 31

Networking

1 coffee chat this week


Slide 8 of 31

USE THE SHEET!

NOW WITH TWO TABS!: Google Sheet


Slide 9 of 31

Grab The Checklist

!checklist


Slide 10 of 31

PUSH EVERY DAY


Slide 11 of 31

Express


Slide 12 of 31

But First

Blast To The Past


Slide 13 of 31

How Does The Internet Work


Slide 14 of 31

"It is a set of rules that allow programs to talk to each other. The developer creates the API on the server and allows the client to talk to it."


Slide 15 of 31

CRUD

Create (post) - Make something

Read (get) - Get Something

Update (put) - Change something

Delete (delete) - Remove something


Slide 16 of 31

Instagram

What are some Create (post) requests?


Slide 17 of 31

Instagram

What are some Read (get) requests?


Slide 18 of 31

Instagram

What are some Update (put) requests?


Slide 19 of 31

Instagram

What are some Delete (delete) requests?


Slide 20 of 31

Coffee Chat & Professional Review

leonnoel.com/instagram


Slide 21 of 31

Let's Build An App with Express


Slide 22 of 31

Express

Fast, unopinionated, minimalist web framework for Node.js

 

With a myriad of HTTP utility methods and middleware at your disposal, creating a robust API is quick and easy.


Slide 23 of 31

Slide 24 of 31

TONIGHT WE BUILD


Slide 25 of 31

Key Steps


Slide 26 of 31
mkdir api-project
cd api-project
npm init 
npm install express --save

Setting Up The Project


Slide 27 of 31
app.get('/', (req, res) => {
  res.sendFile(__dirname + '/index.html')
})

Serving Up HTML


Slide 28 of 31
app.get('/api/savage', (request, response) => {
  response.json(object)
})

Serving Up JSON


Slide 29 of 31
heroku login -i
heroku create simple-rap-api
echo "web: node server.js" > Procfile
git add . 
git commit -m "changes"
git push heroku main

Push To Heroku


Slide 30 of 31

Slide 31 of 31

Homework

 

Do: Start prepping THE BANK

Do: Complete Your Professional Links

Create: Heroku, Mongo Atlas, and Postman Accounts

Read: Node.js and Express (Fullstack Open)

Do: Make Your Own API and Push To Heroku