This repository has been archived by the owner on Mar 27, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 149
Hook into vault #1
Merged
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
35f7f21
Add dockerfile
djenriquez fcf0c35
Add request to vault API, use accessToken
djenriquez bea0715
Attempt to add express
djenriquez e2d1ce7
Spellcheck
djenriquez 1ae4d09
Clean up
djenriquez 4e8ec55
Hooking into Vault
ab316ef
Fixing conflict
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,18 @@ | ||
FROM node:slim | ||
|
||
MAINTAINER Team Lucretius | ||
|
||
ADD package.json /tmp/package.json | ||
RUN cd /tmp && npm install | ||
RUN mkdir -p /app/ && cp -a /tmp/node_modules /app/ | ||
|
||
RUN npm install --silent -g webpack | ||
|
||
ADD . /app | ||
WORKDIR /app | ||
|
||
RUN webpack && npm run build | ||
|
||
EXPOSE 8000 | ||
|
||
CMD ["npm", "run", "serve"] |
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
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
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
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,29 @@ | ||
import express from 'express'; | ||
import bodyParser from 'body-parser'; | ||
import favicon from 'serve-favicon'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. probably dont need this favicon thing. |
||
|
||
const PORT = 8000; | ||
|
||
var app = express(); | ||
|
||
app.use('/assets', express.static('dist')); | ||
|
||
// parse application/x-www-form-urlencoded | ||
app.use(bodyParser.urlencoded({ extended: false })); | ||
|
||
// parse application/json | ||
app.use(bodyParser.json()); | ||
|
||
app.use((req, res, next) => { | ||
res.header('Access-Control-Allow-Origin', '*'); | ||
res.header('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept'); | ||
next(); | ||
}); | ||
|
||
app.listen(PORT, () => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I usually throw this line on the very bottom after I register all of my routes. |
||
console.log(`Vault UI listening on: ${PORT}`); | ||
}); | ||
|
||
app.get('*', function(req, res) { | ||
res.render('index.html'); | ||
}); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here about the favicon