Skip to content

Instantly share code, notes, and snippets.

View caprosset's full-sized avatar
🏠
Working from home

Capucine caprosset

🏠
Working from home
View GitHub Profile
@caprosset
caprosset / README.md
Last active August 30, 2023 00:39
Migrating your database from mLab (Heroku add-on) to Mongo Atlas

Migrating your database from mLab (Heroku add-on) to MongoDB Atlas

This is the message you should have received from Heroku in your mailbox some weeks/days ago:

[Shutdown Notice]: mLab MongoDB add-on Dear Heroku customer,

We have identified you as the owner of, or collaborator on, the following apps that have the mLab MongoDB add-on installed:

...list of projects...

@caprosset
caprosset / README.md
Last active November 2, 2020 18:53
Deployment con Heroku y Firebase - M3

Proyecto 3 - DEPLOY

 

PARTE 1 - BACK-END: HEROKU Y MONGO ATLAS

 

1. GUARDAR Y SUBIR LOS ÚLTIMOS CAMBIOS A GITHUB

@caprosset
caprosset / App.js
Last active November 16, 2020 11:25
LAB Solution | React WikiCountries
// src/App.js
import React from 'react';
import { Switch, Route } from 'react-router-dom';
import './App.css';
import countriesFromJSON from './countries.json';
import CountriesList from './components/CountriesList';
import CountryDetail from './components/CountryDetail';
@caprosset
caprosset / App.css
Created August 13, 2020 09:58
LAB Solution | React IronContacts
// src/App.css
.App {
text-align: center;
}
#action-buttons button {
margin: 0 20px;
}
@caprosset
caprosset / AddNewFood.js
Last active February 14, 2021 09:52
LAB Solution | React IronNutrition
// src/components/AddNewFood.js
import React, { Component } from 'react';
class AddNewFood extends Component {
state = {
name: "",
calories: "",
image: ""
}
@caprosset
caprosset / README.md
Last active November 20, 2020 13:37
Deployment con Heroku - M2

Proyecto 2 - DEPLOY CON HEROKU & MONGO ATLAS

1. GUARDAR Y SUBIR LOS ÚLTIMOS CAMBIOS A GITHUB

1.1. Hacer commit en la rama develop (o staging, es decir la rama con la que trabajan los dos)

$ git add .
$ git commit -m 'Mensaje de commit'
$ git push origin develop
@caprosset
caprosset / README.md
Last active December 19, 2020 09:33
Proyecto M2 - Primeros pasos & Git flow

M2 Project - Git Flow

Configuración inicial:

  • Crear un repositorio en Github para el proyecto (solo uno por equipo).
  • En el ordenador, crear la carpeta del proyecto, e incluir un archivo .gitignore para NodeJS (ejemplo aquí).
  • Inicializar el proyecto en local con git (git init)
  • Vincularlo con el repo Github (git remote add origin <url-del-repo-github>)
  • Crear una rama develop (el proyecto tendrá 2 ramas principales: main y develop)
@caprosset
caprosset / APIHandler.js
Last active July 29, 2020 08:26
LAB Solution | Ajax Crud Characters
class APIHandler {
constructor (baseUrl) {
this.BASE_URL = baseUrl;
this.APIRequest = axios.create({
baseURL: `${this.BASE_URL}/characters`,
});
}
getFullList () {
return this.APIRequest
@caprosset
caprosset / README.md
Last active September 9, 2021 15:16
LAB Solution | Advanced Querying Mongo

LAB Solution | Advanced Querying Mongo


Answers

1. All the companies whose name match 'Babelgum'. Retrieve only their name field.

In Mongo Compass:

  • Query: { name: "Babelgum" }
@caprosset
caprosset / README.md
Last active September 24, 2024 21:46
Github Pages deployment - M1

M1 - Deployment (ES)

Actualizar el proyecto y guardar los últimos cambios

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).