wip nest course
This commit is contained in:
9
tests_hugo/with_express/index.html
Normal file
9
tests_hugo/with_express/index.html
Normal file
@@ -0,0 +1,9 @@
|
||||
<!Doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>title</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>hello world</h1>
|
||||
</body>
|
||||
</html>
|
||||
17
tests_hugo/with_express/package.json
Normal file
17
tests_hugo/with_express/package.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "tests_hugo",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "server.js",
|
||||
"dependencies": {
|
||||
"express": "^4.18.2"
|
||||
},
|
||||
"devDependencies": {},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"start": "node server.js"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC"
|
||||
}
|
||||
10
tests_hugo/with_express/server.js
Normal file
10
tests_hugo/with_express/server.js
Normal file
@@ -0,0 +1,10 @@
|
||||
const express = require('express')
|
||||
const server = express()
|
||||
|
||||
server.get('/', (req, res) => {
|
||||
res.sendFile(__dirname + "/" + "index.html")
|
||||
})
|
||||
|
||||
const port = 3000
|
||||
server.listen(port, console.log(`listening on port ${port} with express`));
|
||||
|
||||
Reference in New Issue
Block a user