Today I learned about new methods for returning data!
.find returns the first item that matches your search
.filter returns all items that match the search
.object.assign replaces data within the object
crud - create, read, update, delete
. splice
We also learned about linking the front to backend
We got data, patched data and deleted data using postman
postman already uses headers for us but we need to put it in the repil
headers: content type: application/json
Then we need to 'stringify' the body for the server to accept it - eg. JSON.stringify({ description: form.description.value })
How to get the user list of all tasks:
app.get("/tasks", (_request, response) => {
response.json(tasks)
I also learned a bit about SQL in the videos - to start:
SELECT
FROM
WHERE
->=
<>
AND
OR
ORDER BY
DESC
INSER INTO
UPDATE
CREATE DATABASE
DROP DATABASE
Today I learned about new methods for returning data!
.find returns the first item that matches your search .filter returns all items that match the search .object.assign replaces data within the object
We also learned about linking the front to backend
Then we need to 'stringify' the body for the server to accept it - eg. JSON.stringify({ description: form.description.value }) How to get the user list of all tasks: app.get("/tasks", (_request, response) => { response.json(tasks)
I also learned a bit about SQL in the videos - to start: SELECT FROM WHERE ->= <> AND OR ORDER BY DESC INSER INTO UPDATE CREATE DATABASE DROP DATABASE