Brief description of the project
MVP definition, deliverables and/or user stories
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width" /> | |
<link rel="stylesheet" href="./css/style.css" /> | |
<title>Ironhack Cart</title> | |
</head> | |
<body> | |
<h1>Ironhack Cart</h1> |
// Iteration 1: All directors? - Get the array of all directors. | |
// _Bonus_: It seems some of the directors had directed multiple movies so they will pop up multiple times in the array of directors. How could you "clean" a bit this array and make it unified (without duplicates)? | |
function getAllDirectors(movies){ | |
const directors = movies.filter(movie => movie.director).map(movie=>movie.director); | |
return [...new Set(directors)]; | |
} | |
// Iteration 2: Steven Spielberg. The best? - How many drama movies did STEVEN SPIELBERG direct? |
Run the following commands in your terminal (in your SERVER/BACKEND repo):
heroku --version
If it gives you a version, it means that the Heroku CLI interface is correctly installed.
If not, create an account in Heroku (https://signup.heroku.com/) and repeat.
const mongoose = require("mongoose"); | |
const Recipe = require("./models/Recipe.model"); // Import of the model Recipe from './models/Recipe.model.js' | |
const recipesJS = require("./data.js"); // Import of the data from './data.js' | |
// Connection to the database "recipeApp" | |
mongoose | |
.connect("mongodb://localhost/recipe-app-dev", { | |
useCreateIndex: true, | |
useNewUrlParser: true, | |
useUnifiedTopology: true |
class Chronometer { | |
constructor() { | |
this.currentTime = 0; | |
this.intervalId = 0; | |
// BONUS => | |
this.millisecondsIntervalId = 0; | |
this.currentMilliseconds = 0; | |
} |