-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into paper-submission
* master: use src/environments.js #26 Fix a error come from git rebase process #26 push Travis to build ... #26 load all the test's necessaire environment variables from system only #26 tidy up the code and package.json #26 lint and clean up the codes #26 refactoring the create Badge code to BadgeService, clean up the app.js (the creation is not working? ) #26 use Habitat to load the enviroment variables in BadgeClient and Servicce, comment out the api.js test (config conflict with env.dist) #26 refactroing all the badges read endpoints + IT #26 3 endpoints works with IT #26 wip 2 endpoints worked with IT #26 wip
- Loading branch information
Showing
8 changed files
with
277 additions
and
277 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,19 @@ | ||
# Copy this file to .env or just set these environment variables | ||
|
||
# default port is 5000 | ||
export PORT=5000 | ||
export SESSION_SECRET=USE_SOMETHING_GOOD_LIKE_puUJjfE6QtUnYryb | ||
|
||
# Badges | ||
export BADGES_ENDPOINT=http://example.com | ||
export BADGES_KEY=master | ||
export BADGES_SECRET=test_secret | ||
export BADGES_SYSTEM=badgekit | ||
|
||
# ORCID Auth | ||
export ORCID_AUTH_CLIENT_ID=test_client | ||
export ORCID_AUTH_CLIENT_SECRET=0eafb938-020e-45a6-a148-3c222171d9d8 | ||
export ORCID_AUTH_SITE=http://example.com | ||
export ORCID_AUTH_TOKEN_PATH=http://api.example.com/oauth/token | ||
export ORCID_REDIRECT_URI=http://localhost:5000/orcid_auth_callback | ||
|
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,10 @@ | ||
var ApiClient = require('badgekit-api-client'); | ||
|
||
module.exports = function (config) { | ||
var auth = { | ||
key: config.get('BADGES_KEY'), | ||
secret: config.get('BADGES_SECRET') | ||
}; | ||
|
||
return new ApiClient(config.get('BADGES_ENDPOINT'), auth); | ||
}; |
Oops, something went wrong.