This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Chronometer { | |
constructor() { | |
this.currentTime = 0; | |
this.intervalId = 0; | |
// BONUS => | |
this.millisecondsIntervalId = 0; | |
this.currentMilliseconds = 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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> |
Antes de despliegar/subir nuestro proyecto, primero guardaremos los últimos cambios con un commit
y subiremos estos cambios a GitHub (git push origin master
o git push origin main
dependiendo de cómo se llame la rama principal).
OlderNewer