Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const express = require('express')
- const app = express()
- app.get('/en', function (req, res) {
- res.send('Hello World!')
- })
- app.get('/fi', function (req, res) {
- res.send('Terve maailma!')
- })
- app.use(function (req, res, next) {
- console.log("Requested " + req.path + " " + req.originalUrl)
- res.status(404).send("Sorry can't find that! Requested " + req.path + " " + req.originalUrl + req.)
- })
- app.listen(process.env.PORT, () =>
- console.log(`Listening on port 5000!`))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement