As a Developer
I want to fetch the data from the database and manage all the function of the app
with it,
so that the localstorage is no longer required.
Acceptance criteria
[ ] database is set up and datas are fetched from it
Tasks
[ ] work on at branch feat/setup_database
[ ] api/cards/index.js
[ ] write async handler function with request.method "GET" and mongoose method .find
[ ] _app.js
[ ] import { SWRConfig } from "swr";
[ ] create const fetcher outside the function
[ ] wrap with , const fetcher as value -> value={{ fetcher }} of the SWRConfig
[ ] pages/index.js
[ ] fetch cards from api/cards, useSWR
[ ] destructure data, error and isLoading from useSWR hook
[ ] rename data to cards
[ ] set an early return statement for error and isLoading
User Story - Database Connection
Value proposition
As a Developer I want to fetch the data from the database and manage all the function of the app with it, so that the localstorage is no longer required.
Acceptance criteria
Tasks