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
const express = require('express'); | |
const app = express(); | |
//app.get(/) | |
app.get('/', (req, res, next) => { | |
// console.log(req); | |
res.send("welcome this is the 1st page") | |
}); | |
app.get('/about', (req, res, next) => { | |
// console.log(req); |
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
const express = require("express") | |
const mail = require("./routes/index.js") | |
const app = express() | |
app.use(express.json()) | |
app.use(express.urlencoded()) | |
app.use('/mail', mail); | |
app.listen(4000) |
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 React, { Component } from 'react'; | |
class App extends Component { | |
render() { | |
return ( | |
<div className="App"> | |
<Author name='Click for author name'/> |
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 Linux (x86_64) | |
-- | |
-- Host: localhost Database: valery_c_wcs_paris | |
-- ------------------------------------------------------ | |
-- Server version 5.7.21-0ubuntu0.16.04.1 | |
/*!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
const express = require('express') | |
const app = express() | |
app.use('/superMiddleware', (req, res, next) => { | |
console.log('hello middleware ') | |
next() | |
}, | |
(req, res, next) => { | |
res.send('hello world') |
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
//creer un fichier users2.js | |
//npm install express --save à faire le dossier dans lequelle où on se trouve | |
//une fois lancer node users.js | |
//copier l'adresse donné par le terminal en l'occurence http://localhost:3000/forms-101?level=easy | |
//allez sur postman et tester les methodes post et get | |
//L'application requiert l'utilisation du module Express. | |
//La variable express nous permettra d'utiliser les fonctionnalités du module Express. | |
const express = require('express'); | |
// Nous définissons ici les paramètres du serveur. |
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
//creer un fichier users.js | |
//npm install express --save à faire le dossier dans lequelle où on se trouve | |
//une fois fichier créer, lancez: node users.js | |
//copier l'adresse donné par le terminal en l'occurence http://localhost:3000 | |
//allez sur postman et tester les methodes put (entrez votre nom) et delete (mettez un chiffre) | |
//L'application requiert l'utilisation du module Express. | |
//La variable express nous permettra d'utiliser les fonctionnalités du module Express. | |
const express = require('express'); |
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
body { | |
font-family: 'Trebuchet MS'; | |
text-align: center; | |
color :#fff; | |
text-shadow: 1px 1px 1px rgba(0,0,0,0.5) ; | |
height: 100vh; | |
overflow: hidden; | |
display: flex; | |
justify-content: center; | |
align-items: center; |
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
/* | |
for this quest open your terminal. and write this on the current file : | |
npm init | |
npm install -g cowsay | |
after that create a file .js and put the code below and enjoy | |
*/ | |
const cowSay = require('cowsay') | |
console.log(cowSay.say({text : 'hello boy' })) |
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
process.stdin.resume() | |
process.stdin.setEncoding('utf8') | |
const now = new Date() | |
let year = now.getFullYear() | |
const onData = (age) => { |
NewerOlder