## Parklife – the local park recommender

by Nafisa, Evgeny, Sevda, & Michael
---
Roles:
Evgeny - Facilitator
Sevda - User
Michael - Quality
Nafisa- Deployment
---
Day 1:
Set up the project as a four & also added issues to our project board
Split into pairs:
Evgeny & Sevda - setting up our heroku database and getting the connection string
Michael & Nafisa - started working on the server and route handler functions
---

---
Day two:
Michael & Evgeny - worked on some of our server route tests
Sevda & Nafisa - started to add the database queries in a model.js file to use in our route handlers
Worked as a four to deploy
---
## Sevda - Demo
---
## Michael
---

---

---
```
beforeEach(() => {
cy.task("resetDb");
});
describe("show homepage", () => {
it("displays a heading", () => {
cy.visit("/");
cy.contains("park finder");
});
});
```
---
```
module.exports = (on, config) => {
on("task", {
resetDb: () => {
console.log("Resetting DB...");
// we have to return something or Cypress gets mad
return null;
},
});
};
```
---
## What we learned
---

#### It's the taking part that counts
---

---

---

---
## Evgeny - Heroku
---
This is how I felt about deployment to Heroku last week and I still feel the same:

---
* We followed all the Spikes guidelines on deployment
* We followed this week workshop on connecting our DB to Heroku
* We changed PORT to process.env.PORT as we all learned from last week
```
const PORT = process.env.PORT || 3000
```
---

---

---
Thanks to our wonderfull mentors who spent literally hours with us we found a solution!!

---
***This week heroku solution:***
```
const options = {
connectionString: DB_URL,
ssl: { rejectUnauthorized: false },
};
```
By setting rejectUnauthorized: false , you're saying "I don't care if I can't verify the server's identity."
---
Thanks to Michael who introduced us to regular tea breaks, that helped us to disconnect:

---

---
{"metaMigratedAt":"2023-06-15T23:23:32.752Z","metaMigratedFrom":"Content","title":"Untitled","breaks":true,"contributors":"[{\"id\":\"12ba2d80-f158-4148-9ff5-c50f626d4b40\",\"add\":873,\"del\":307},{\"id\":\"542fc42e-6a66-41fd-b72f-cf17ca2fb561\",\"add\":1126,\"del\":30},{\"id\":\"ed85db99-8527-44b2-9bd7-ec1d8e4a4689\",\"add\":1456,\"del\":289},{\"id\":\"7a5548f0-da55-4d05-a75d-a38212f27c1c\",\"add\":0,\"del\":1}]"}