Created
November 13, 2018 13:03
-
-
Save jerzyyy/ec1644e338146c6a53410a9877e12bd1 to your computer and use it in GitHub Desktop.
http
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
let express = require('express'); | |
let app = express(); | |
const port = 3000; | |
app.get('/', (req, res) => { | |
res.send(`<h1>Bienvenue sur votre serveur !!</h1>`); | |
}); | |
app.get('/contact', (req, res) => { | |
res.send(`<h1>Nous ne sommes pas joignables pour le moment !</h1>`); | |
}); | |
app.get('/display/:name', (req, res) => { | |
res.send(`<h1>Vous tentez d’afficher le profil de ${req.params.name}</h1>`); | |
}); | |
const message = `server open ${port}`; | |
app.listen(port,()=>console.log(message)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment