-
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.
basic setup: linter, hapi server, index.html, main.css
- Loading branch information
1 parent
a23da39
commit be2cd86
Showing
6 changed files
with
100 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"extends": "airbnb", | ||
"env": { | ||
"browser": true, | ||
"node": true | ||
}, | ||
"rules": { | ||
"no-console": 0, | ||
"no-param-reassign": 0 | ||
} | ||
} |
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,11 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<link rel="stylesheet" type="text/css" href="public/main.css"> | ||
<title></title> | ||
</head> | ||
<body> | ||
|
||
</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,36 @@ | ||
{ | ||
"name": "personal-website", | ||
"version": "1.0.0", | ||
"description": "A homepage for my portfolio and web development blog", | ||
"main": "server.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/bradreeder/Personal-Website.git" | ||
}, | ||
"keywords": [ | ||
"Portfolio", | ||
"Web-Development", | ||
"Blog" | ||
], | ||
"author": "Bradley Reeder", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/bradreeder/Personal-Website/issues" | ||
}, | ||
"homepage": "https://github.com/bradreeder/Personal-Website#readme", | ||
"devDependencies": { | ||
"eslint": "^3.2.2", | ||
"eslint-config-airbnb": "^10.0.0", | ||
"eslint-config-defaults": "^9.0.0", | ||
"eslint-plugin-import": "^1.12.0", | ||
"eslint-plugin-jsx-a11y": "^2.0.1", | ||
"eslint-plugin-react": "^6.0.0" | ||
}, | ||
"dependencies": { | ||
"hapi": "^14.1.0", | ||
"inert": "^4.0.1" | ||
} | ||
} |
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,3 @@ | ||
body { | ||
background-image: url('/resources/background_image.jpg'); | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,39 @@ | ||
const hapi = require('hapi'); | ||
|
||
const server = new hapi.Server(); | ||
server.connection({ | ||
port: 4000, | ||
host: 'localhost', | ||
}); | ||
server.register(require('inert'), (err) => { | ||
if (err) throw err; | ||
server.route([{ | ||
path: '/', | ||
method: 'GET', | ||
handler: (request, response) => { | ||
response.file('./index.html'); | ||
}, | ||
}, { | ||
path: '/public/{file*}', | ||
method: 'GET', | ||
handler: { | ||
directory: { | ||
path: './public', | ||
listing: true, | ||
}, | ||
}, | ||
}, { | ||
path: '/resources/{file*}', | ||
method: 'GET', | ||
handler: { | ||
directory: { | ||
path: './resources', | ||
listing: true, | ||
}, | ||
}, | ||
}]); | ||
}); | ||
|
||
server.start(() => { | ||
console.log(`Server is currently running on: ${server.info.uri}`); | ||
}); |