This is the first gist
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 express = require('express') | |
| const app = express() | |
| const mongoose = require('mongoose') | |
| app.use(express.urlencoded({ | |
| extended : true | |
| })) | |
| const User = require('./models/user') | |
| const nodemailer = require('nodemailer') | |
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
| import './App.css'; | |
| import {useState, useEffect} from 'react' | |
| import {client} from './client' | |
| function App() { | |
| const [recipes, setRecipes] = useState([]) | |
| useEffect(() => { | |
| fetchContentful() |
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
| // our api you can find on : https://www.edamam.com/ | |
| // https://api.edamam.com/api/recipes/v2?type=public&q=chicken&app_id=c9b8432d&app_key=3cef973b112723bd3fe2babe2ebd396e | |
| import { useState, useEffect } from "react"; | |
| import axios from "axios"; | |
| const App = () => { | |
| const [recipes, setRecipes] = useState([]); | |
| const [search, setSearch] = useState("beef"); |
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
| import "./App.css"; | |
| import { useState, useEffect } from "react"; | |
| import axios from "axios"; | |
| const App = () => { | |
| const [data, setData] = useState([]); | |
| const [loading, setLoading] = useState(false) | |
| const [querie, setQuerie] = useState('') | |
| const [search, setSearch] = useState('') |
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 Cat { | |
| constructor(name) { | |
| this._name = name; | |
| this._tiredness = this.randomValue(100); | |
| this._hunger = this.randomValue(100); | |
| this._loneliness = this.randomValue(100); | |
| this._happiness = this.randomValue(100); | |
| } | |
| randomValue(max) { |
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 Vehicule { | |
| constructor(brand, color, km){ | |
| this._brand = brand, | |
| this._color = color, | |
| this._km = km | |
| } | |
| brand(){ |
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 express = require('express') | |
| const app = express() | |
| const PORT = 3002 | |
| const usersRouter = require('./router/usersRouter') | |
| const ordersRouter = require('./router/ordersRouter') | |
| require('dotenv').config() | |
| app.use(express.json()) | |
| app.use(express.urlencoded({ | |
| extended : true | |
| })) |
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 mysql = require('mysql') | |
| const connection = mysql.createConnection({ | |
| host : '', | |
| user : '', | |
| password : '', | |
| database : '' | |
| }) | |
| module.exports = connection |
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 express = require("express"); | |
| const app = express(); | |
| const PORT = 3002; | |
| app.use(express.json()); | |
| require("dotenv").config; | |
| const connection = require("./conf"); | |
| app.use( | |
| express.urlencoded({ | |
| extented: true, | |
| }) |
NewerOlder