## Parklife – the local park recommender ![](https://i.imgur.com/cB9gQdn.png) 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 --- ![](https://i.imgur.com/tIgwb2A.png) --- 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 --- ![](https://media.giphy.com/media/3orieKKmYyvUdR3RkY/giphy.gif) --- ![](https://media.giphy.com/media/NnJib5EkPyym4/giphy.gif) --- ``` 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 --- ![](https://media.giphy.com/media/1msyFROnYWHO5vwZ4g/giphy.gif) #### It's the taking part that counts --- ![](https://media.giphy.com/media/vISmwpBJUNYzukTnVx/giphy.gif) --- ![](https://media.giphy.com/media/NEvPzZ8bd1V4Y/giphy.gif) --- ![](https://media.giphy.com/media/3d01NemOfuEKiMzbLU/giphy.gif) --- ## Evgeny - Heroku --- This is how I felt about deployment to Heroku last week and I still feel the same: ![](https://media.giphy.com/media/jok2gx7IQJZLi/giphy.gif) --- * 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 ``` --- ![](https://i.imgur.com/JYh7Act.png) --- ![](https://media.giphy.com/media/eh1EVkEIO4P9X4yu4a/giphy.gif) --- Thanks to our wonderfull mentors who spent literally hours with us we found a solution!! ![](https://media.giphy.com/media/BlVnrxJgTGsUw/giphy.gif) --- ***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: ![](https://media.giphy.com/media/ym6PmLonLGfv2/giphy.gif) --- ![](https://media.giphy.com/media/fxI1G5PNC5esyNlIUs/giphy.gif) ---
{"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}]"}
    193 views