-
Lab 07:
- We have been provided with starter code. We are tasked with going through the code, finding the bugs, and fixing them. We are also tasked with double checking features to the code base. So this lab is primarily debugging and testing for bearer auth.
-
Ryan Gallaway - provided the starter code, debugged as a class
-
Reece Renninger - collabed with
- PORT=3001
- create repo on GitHub
- clone repo to local machine
npm init -y
npm i
nodemon
ornode index.js
to start server
- Feature One: Details of feature
- GET :
/
- specific route to hit - GET :
/person
- expects a query string with a name property
-
How do you run tests?
nodemon
- open thunder client
- enter url w/ query string
- hit send
psql
\c <database name>
\dt
\d <table name>
SELECT * FROM <table name>;
INSERT INTO <table name> (name, type) VALUES ('<name>', '<type>');
UPDATE <table name> SET name='<new name>', type='<new type>' WHERE id=<id>;
DELETE FROM <table name> WHERE id=<id>;
-
confirm that the database is empty
-
nodemon
-
open thunder client
-
enter url w/ query string
-
hit send
-
test all RESTful CRUD routes
-
TDD if possible
-
Any tests of note?
- 200 status on a proper request
- 500 status on a bad request
- 404 status on a bad route
- RESTful CRUD
-
Describe any tests that you did not complete, skipped, etc