Video 46: Serving up CSS, JS, Impages, and More
This commit is contained in:
1 parent
8f136ffed8
commit
e393438dd1
7 files changed
+26
-1
No files matched your search
@@ -1,8 +1,14 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
|
<link rel="stylesheet" href="/css/styles.css">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<h1>About</h1>
|
<h1>About</h1>
|
||||||
|
<img src="/img/me.jpg">
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
h1 {
|
||||||
|
color: grey;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 250px;
|
||||||
|
}
|
||||||
@@ -1,8 +1,13 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
|
<link rel="stylesheet" href="/css/styles.css">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<h1>Help</h1>
|
<h1>Help</h1>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 677 KiB |
@@ -1,8 +1,14 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
|
<link rel="stylesheet" href="/css/styles.css">
|
||||||
|
<script src="/js/app.js"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<h1>From a static file</h1>
|
<h1>From a static file</h1>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
console.log('Client side javascript file is loaded!')
|
||||||
@@ -8,7 +8,7 @@ app.use(express.static(publicDirectoryPath))
|
|||||||
|
|
||||||
app.get('/weather', (req, res) => {
|
app.get('/weather', (req, res) => {
|
||||||
res.send({
|
res.send({
|
||||||
forecast: 'It\'s snowing. It\'s really gross out.',
|
forecast: 'It is snowing. In September.',
|
||||||
location: 'Calgary'
|
location: 'Calgary'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in new issue
Block a user