-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add payment-processor hbs file Add content to default.hbs file Register inert and vision in server.js Relates #27 #25 #23
- Loading branch information
1 parent
68aee6a
commit 26d5a70
Showing
5 changed files
with
34 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
module.exports = [ | ||
require('./home'), | ||
require('./payment-processor'), | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = { | ||
method: 'GET', | ||
path: '/payment-processor', | ||
handler: (req, reply) => { | ||
reply.view('payment-processor'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,23 @@ | ||
const hapi = require('hapi'); | ||
const inert = require('inert'); | ||
const vision = require('vision'); | ||
const handlebars = require('./handlebars'); | ||
const routes = require('./routes'); | ||
|
||
const server = new hapi.Server(); | ||
|
||
|
||
server.connection({ | ||
// host: process.env.HOSTNAME || 'localhost', | ||
port: process.env.PORT || 4000, | ||
}); | ||
|
||
server.route(routes); | ||
server.register([inert, vision], (err) => { | ||
if (err) { | ||
throw err; | ||
} | ||
|
||
server.views(handlebars); | ||
server.route(routes); | ||
}); | ||
|
||
module.exports = server; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!DOCTYPE html> | ||
<html lang='es'> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width" initial-scale="1.0"> | ||
<link rel="stylesheet" type="text/css" href="public/css/styles.css"> | ||
<link href="https://fonts.googleapis.com/css?family=Pavanam" rel="stylesheet"> | ||
<title>FAC donation app</title> | ||
</head> | ||
<body> | ||
<h1>I am the default template heading!</h1> | ||
{{{content}}} | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<h1>blah blah blah</h1> |