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
Agenda
- Questions?
- Let's Talk - #100Devs
- Review - Event Loop
- Learn - CRUD
- Learn - Express
- Learn - Build your own API
- Homework - Build your own API
Questions
About last class or life

Checking In

Like and Retweet the Tweet
!checkin
Live CAR Class

FRIDAY
6:00pm EST
And we are talking about the agency
Office Hours

SUNDAY
1:00pm EST
Networking

1 coffee chat this week
USE THE SHEET!

NOW WITH TWO TABS!: Google Sheet
Grab The Checklist
!checklist
PUSH EVERY DAY

Express
But First

Blast To The Past
How Does The Internet Work

"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."
CRUD
Create (post) - Make something
Read (get) - Get Something
Update (put) - Change something
Delete (delete) - Remove something
What are some Create (post) requests?
What are some Read (get) requests?
What are some Update (put) requests?
What are some Delete (delete) requests?
Coffee Chat & Professional Review
leonnoel.com/instagram
Let's Build An App with Express

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.

TONIGHT WE BUILD

Key Steps
mkdir api-project
cd api-project
npm init
npm install express --save
Setting Up The Project
app.get('/', (req, res) => {
res.sendFile(__dirname + '/index.html')
})
Serving Up HTML
app.get('/api/savage', (request, response) => {
response.json(object)
})
Serving Up JSON
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

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
