This file contains 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
var express = require('express'); | |
var router = express.Router(); | |
var nodemailer = require("nodemailer"); | |
// Création de la méthode de transport de l'email à intégrer dans index.js dans les routes. | |
var smtpTransport = nodemailer.createTransport({ | |
service: "Gmail", | |
port: 587, |
This file contains 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
var express = require('express'); | |
var router = express.Router(); | |
/* Récupération du paramètre d'URL + du level. | |
http://localhost:3000/superMiddleware | |
- contient deux fonctions, | |
- middleware comporte le next, | |
- middleware affiche hello middleware en console. | |
*/ |
This file contains 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
-- MySQL Script generated by MySQL Workbench | |
-- Mon Apr 9 12:46:25 2018 | |
-- Model: New Model Version: 1.0 | |
-- MySQL Workbench Forward Engineering | |
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; | |
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; | |
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES'; | |
-- ----------------------------------------------------- |
This file contains 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 url('https://fonts.googleapis.com/css?family=Press+Start+2P'); | |
body { | |
font-size: 62.5%; /* base de "10px" au lieu de "16px" */ | |
font-family: 'Press Start 2P', cursive; | |
} | |
h1{ |
This file contains 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> | |
<head> | |
<title><%= Sweet Fight %></title> | |
<link rel='stylesheet' href='/stylesheets/style.css' /> | |
</head> | |
<body> | |
<section class="choixperso"> | |
<div class="backgroundcaroussel"> |
This file contains 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
var express = require('express'); | |
var router = express.Router(); | |
/* Récupération du paramètre d'URL + du level. | |
http://localhost:3000/forms-101?level=easy | |
doc req.params : http://expressjs.com/fr/api.html#req.params | |
doc req.query : http://expressjs.com/fr/api.html#req.query | |
*/ | |
router.get('/forms-:numeroForm(\\d+)', (req, res) => { |
This file contains 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
-- MySQL dump 10.13 Distrib 5.7.21, for macos10.13 (x86_64) | |
-- | |
-- Host: localhost Database: test | |
-- ------------------------------------------------------ | |
-- Server version 5.7.21 | |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | |
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | |
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | |
/*!40101 SET NAMES utf8 */; |
This file contains 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
extends layout.pug | |
block content | |
p Say Hello | |
include header.pug | |
This file contains 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
var express = require('express'); | |
var router = express.Router(); | |
/* "Réponse Hey ! It's a get cool" sur la page d'accueil qui correspond à la route (/users/. | |
Correspondance POSTMAN : http://127.0.0.1:3000/users/ */ | |
router.get('/', function(req, res, next) { | |
res.send('Hey ! It\'s a GET cool '); | |
}); |