Open YavorLalev opened 6 months ago
As a developer I need a database to store the settings the user makes to generate a plot.
[x] Create a new Gmail account and use the e-mail address to:
[x] Create a new feature branch "database-setup"
[x] Connect the database with the app:
npm install mongoose
.env.local
db/connect.js
db/models
[ ] Write API-routes for GET, POST, UPDATE and DELETE:
pages/api/plots
index.js
dbConnect
Great Work! That Story makes sense to me. 👍
Value proposition
As a developer I need a database to store the settings the user makes to generate a plot.
Acceptance Criteria
Tasks
[x] Create a new Gmail account and use the e-mail address to:
[x] Create a new feature branch "database-setup"
[x] Connect the database with the app:
npm install mongoose
.env.local
-file at the root of the project (content: MONGODB_URI....)db/connect.js
and copy code from here: https://github.com/neuefische/ffm-web-23-6/blob/main/sessions/backend-read/assets/dbConnect.jsdb/models
folder[ ] Write API-routes for GET, POST, UPDATE and DELETE:
pages/api/plots
withindex.js
dbConnect
function and Plot schema