Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
dillson
committed
Sep 14, 2018
0 parents
commit 64c3049
Showing
1,929 changed files
with
192,864 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,2 @@ | ||
node_modules | ||
npm-debug.log |
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,12 @@ | ||
from node:8 | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY package*.json ./ | ||
|
||
RUN npm install | ||
|
||
COPY . . | ||
|
||
EXPOSE 8080 | ||
CMD [ "node", "index.js" ] |
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,40 @@ | ||
// index.js | ||
const path = require('path') | ||
const express = require('express') | ||
const exphbs = require('express-handlebars') | ||
const port = 8080 | ||
|
||
const app = express() | ||
|
||
app.engine('.hbs', exphbs({ | ||
defaultLayout: 'main', | ||
extname: '.hbs', | ||
layoutsDir: path.join(__dirname, 'views/layouts') | ||
})) | ||
app.set('view engine', '.hbs') | ||
app.set('views', path.join(__dirname, 'views')) | ||
|
||
app.use(express.static('public')) | ||
|
||
app.get('/', (request, response) => { | ||
response.render('home') | ||
}) | ||
|
||
app.get('/vke', (request, response) => { | ||
response.render('vke') | ||
}) | ||
|
||
app.get('/cloudbees', (request,response) => { | ||
response.render('cloudbees') | ||
}) | ||
|
||
app.get('/images', (request,response) => { | ||
response.render('image') | ||
}) | ||
|
||
app.listen(port, (err) => { | ||
if (err) { | ||
return console.log('the server threw an error', err) | ||
} | ||
console.log(`server is listening on ${port}`) | ||
}) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.