Skip to content

Commit 380d7ae

Browse files
committed
2.1 hosting static files
1 parent 355008d commit 380d7ae

File tree

4 files changed

+395
-0
lines changed

4 files changed

+395
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
constexpress=require('express');
2+
3+
constapp=express();
4+
app.listen(3000,()=>console.log('listening at 3000'));
5+
app.use(express.static('public'));

‎module2/01_hosting_static_files/package-lock.json‎

Lines changed: 358 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "module2_exercise1",
3+
"version": "1.0.0",
4+
"description": "Serving two pages.",
5+
"main": "index.js",
6+
"scripts":{
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"keywords": [
10+
"example",
11+
"data",
12+
"selfie"
13+
],
14+
"author": "Daniel Shiffman",
15+
"license": "MIT",
16+
"dependencies":{
17+
"express": "^4.16.4"
18+
}
19+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<htmllang="en">
3+
<head>
4+
<metacharset="UTF-8" />
5+
<metaname="viewport" content="width=device-width, initial-scale=1.0" />
6+
<metahttp-equiv="X-UA-Compatible" content="ie=edge" />
7+
<title>Hello</title>
8+
</head>
9+
<body>
10+
<h1>Data Selfie App</h1>
11+
<p>Hello!</p>
12+
</body>
13+
</html>

0 commit comments

Comments
(0)