Code files
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
'use strict'
|
||||
|
||||
const {Router} = require('express')
|
||||
const router = Router()
|
||||
|
||||
router.get('/', function (req, res) {
|
||||
const title = 'Express'
|
||||
res.send(`
|
||||
<html>
|
||||
<head>
|
||||
<title> ${title} </title>
|
||||
<link rel="stylesheet" href="styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1> ${title} </h1>
|
||||
<p> Welcome to ${title} </p>
|
||||
</body>
|
||||
</html>
|
||||
`)
|
||||
})
|
||||
|
||||
module.exports = router
|
||||
Reference in New Issue
Block a user