Skip to content

Commit 54353c6

Browse files
committed
Create home page
1 parent fa245d5 commit 54353c6

File tree

4 files changed

+12
-15
lines changed

4 files changed

+12
-15
lines changed

public/home.html

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title></title>
6+
</head>
7+
<body>
8+
home page
9+
</body>
10+
</html>

public/static.html

-11
This file was deleted.

src/handlers/home.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
const homeHandler = (request, reply) => {
2-
return reply(
3-
`<h1>Hello world</h1><a href="static.html">go to a static page</a>`
4-
);
2+
return reply.file("home.html");
53
};
64

75
const homeRoute = {

src/server.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ server.register([Inert], (err) => { // We register extra modules like inert here
2525
server.route(routes); // Plug the routes we imported earlier into the server
2626
});
2727

28-
module.exports = server;
28+
module.exports = server;

0 commit comments

Comments
 (0)