-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from molekilla/rel0.6.2
Rel0.6.2
- Loading branch information
Showing
11 changed files
with
89 additions
and
19 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
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 |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
node_modules/ | ||
logs/ | ||
test/ | ||
docs/ | ||
|
||
# Files | ||
# test.pdf | ||
|
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,28 @@ | ||
{ | ||
"tags" : { | ||
"allowUnknownTags" : true | ||
}, | ||
"plugins" : ["plugins/markdown"], | ||
|
||
"templates" : { | ||
"cleverLinks" : false, | ||
"monospaceLinks" : false, | ||
"dateFormat" : "ddd MMM Do YYYY", | ||
"outputSourceFiles" : true, | ||
"outputSourcePath" : true, | ||
"systemName" : "Rutha", | ||
"footer" : "", | ||
"copyright" : "Rutha © 2015", | ||
"navType" : "vertical", | ||
"theme" : "cosmo", | ||
"linenums" : true, | ||
"collapseSymbols" : false, | ||
"inverseNav" : true, | ||
"highlightTutorialCode" : true, | ||
"protocol": "fred://" | ||
}, | ||
"markdown" : { | ||
"parser" : "gfm", | ||
"hardwrap" : true | ||
} | ||
} |
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
9 changes: 8 additions & 1 deletion
9
service/lib/controllers/users/v1/create.js → service/lib/controllers/users/v1/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
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 |
---|---|---|
|
@@ -37,23 +37,43 @@ server.app = { | |
logger: logger | ||
}; | ||
|
||
|
||
// add server methods to IoC mongoose models | ||
var controllers = [ | ||
{ | ||
register: require('lout'), | ||
register: require('../controllers/users'), | ||
} | ||
]; | ||
|
||
var serverPlugins = [ | ||
{ | ||
register: require('hapi-auth-bearer-token') | ||
}, | ||
{ | ||
register: require('hapi-swagger'), | ||
options: | ||
{ | ||
endpoint: '/api/docs' | ||
basePath: 'http://localhost:' + config.get('apiServer:port'), | ||
apiVersion: '1.0', | ||
documentationPath: '/api_docs', | ||
endpoint: '/rest_docs', | ||
authorizations: { | ||
token: { | ||
type: "apiKey", | ||
passAs: "header", | ||
keyname: "authentication" | ||
} | ||
}, | ||
info: { | ||
title: 'Rutha REST API Documentation', | ||
description: 'REST API Docs.', | ||
contact: '[email protected]', | ||
license: 'MIT' | ||
} | ||
} | ||
}, | ||
{ | ||
register: require('../controllers/users'), | ||
} | ||
]; | ||
|
||
|
||
server.register(require('hapi-auth-bearer-token'), function(err) { | ||
server.register(serverPlugins, function(err) { | ||
|
||
server.auth.strategy('token', 'bearer-access-token', { | ||
validateFunc: function(token, 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
node_modules/ | ||
logs/ | ||
dist/ | ||
docs/ | ||
|
||
# Files | ||
# test.pdf | ||
|
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