https://github.com/lightsofapollo/hapi-taskcluster-api
Hapi + Taskcluster API Tools/Schema/Validation (http endpoints only)
https://github.com/lightsofapollo/hapi-taskcluster-api
Last synced: 8 months ago
JSON representation
Hapi + Taskcluster API Tools/Schema/Validation (http endpoints only)
- Host: GitHub
- URL: https://github.com/lightsofapollo/hapi-taskcluster-api
- Owner: lightsofapollo
- License: other
- Created: 2015-01-05T22:13:11.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-01-07T09:17:18.000Z (over 11 years ago)
- Last Synced: 2025-01-27T15:45:46.315Z (over 1 year ago)
- Language: JavaScript
- Size: 148 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hapi-taskcluster-api
Hapi + Taskcluster API Tools/Schema/Validation (http endpoints only).
This is primarily a proof of concept/prototype of using taskcluster +
hapi for server side components (including reference generation).
In addition to the usual scope/hawk authentication a '/reference'
endpoint is generated which will return the reference format which can
be consumed by the `taskcluster-client`'s `createClient` method.
## Example
See the [/test](tests) for the full sets of examples but the most basic
configuration would look like this:
```js
var hapi = require('hapi');
var server = new hapi.Server();
server.register({
register: require('hapi-taskcluster-api'),
options: {
// Taskcluster credentials...
credentials: {
clientId: '...',
accessToken: '...',
}
}
});
server.route({
method: 'post',
path: '/do'
handler: function(request, reply) {
// ...
},
config: {
description: 'Do'
notes: 'Do things',
auth: 'taskcluster', // require taskcluster hawk pass
plugins: {
taskcluster: {
name: 'aliasInClientAutoGen',
scopes: ['do']
}
}
}
});
```