Skip to content

Commit

Permalink
(fix) resource export
Browse files Browse the repository at this point in the history
(update) readme
(inc) version
(fix) lint issues
(refactor) service resources
(add) eslint
  • Loading branch information
jstty committed Aug 22, 2016
1 parent 3da5910 commit cd2d70c
Show file tree
Hide file tree
Showing 157 changed files with 6,527 additions and 6,335 deletions.
33 changes: 33 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"extends": "standard",
"rules": {
"no-multi-spaces": [
"error", {
"exceptions": {
"Property": true,
"VariableDeclarator": true,
"ImportDeclaration": true
}
}
],
"key-spacing": [
"error", {
"align": {
"beforeColon": false,
"afterColon": true,
"on": "value"
},
"mode": "minimum"
}
],
"brace-style": ["error", "stroustrup"],
"no-eval": ["error", {
"allowIndirect": true
}],
"semi": ["error", "always"]
},
"env": {
"node": true,
"mocha": true
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.DS_Store
.idea
.vscode
node_modules
test/.coverage
npm-debug.log
63 changes: 30 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,57 +94,47 @@ See [Examples](./examples) directory

### Releases
## **Current Release**
* 0.5.0 - Release
* Replace Middleware with yanpm plugin manager
* Refactor Service Manager - breaking it into smaller modules
* Custom binary responses
* Examples:
* Auth middleware - Basic
* 0.6.0 - Release
* Service Export
* Added Resource Manager
* Lint Cleanup/Fixes

## Next Release
* 0.6.0 - Polish
* Examples:
* [ ] Auth middleware
* [ ] JWT
* [ ] Passport
* [ ] Error checks (bullet proof)
* [ ] Polish and bug fixes
* [ ] API documentation
* 0.6.x - More Polish
* [ ] Error checks

* 1.0.0 - ES Next!
* [ ] ES6 Classes, decorators
* [ ] General route pipeline
* [ ] Move Express out of the framework to its own plugin (hyper.io-express)
* [ ] API documentation
* [ ] Cleanup/Remove old features not heavily used

## Road Map
---
* 1.0.0 - Release
* [ ] Add $di DI attribute to inject dependencies into a function
* [ ] Move Express out of the framework to its own plugin (hyper.io-express)
* [ ] General route pipeline
* [ ] Input validation
* 1.x.0 - Release
* add Koa support
* Move Service router adapter to plugins and use external repos
* Examples:
* Auth middleware
* JWT
* Passport
* Input validation
* Express
* https://github.com/ctavan/express-validator
* https://github.com/petreboy14/express-joi

* 1.2.0 - Release
* add Koa support
* Plugin manager support private NPM repos
* Move Service router adapter to plugins and use external repos
* Unit Tests
* Route Throttling
* Express
* https://github.com/ivolo/express-rate
* Add CLI
* Keep Alive
* Forever - https://github.com/foreverjs/forever
* PM2 - https://github.com/Unitech/pm2

* 1.4.0 - Release
* API Doc generation
* Express
* https://github.com/fliptoo/swagger-express
* CLI
* Keep Alive
* Forever - https://github.com/foreverjs/forever
* PM2 - https://github.com/Unitech/pm2
* Add API Doc generation

* 1.6.0 - Release
* CLI
* Create Route for a Controller
* Create Basic Server with Service
* Build/Package/Deploy
Expand Down Expand Up @@ -203,6 +193,13 @@ See [Examples](./examples) directory
* Sessions
* Input

* 0.5.0 - Release
* Replace Middleware with yanpm plugin manager
* Refactor Service Manager - breaking it into smaller modules
* Custom binary responses
* Examples:
* Auth middleware - Basic

## License

[MIT licence information](LICENSE).
Expand Down
39 changes: 19 additions & 20 deletions examples/api/auth-basic/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ var authBasic = require('hyper.io-express-auth-basic');
// !-- FOR TESTS
var options = {};
try {
options = JSON.parse(process.env.HYPER_OPTIONS);
} catch(err){}
options = JSON.parse(process.env.HYPER_OPTIONS);
}
catch (err) {}
// --!

// Load config and routes
Expand All @@ -16,27 +17,25 @@ hyper.use(authBasic);

// load config and routes
var app = hyper.start({
routes: [
{
api: "/hello",
required: {
'auth-basic': {
user: 'hello',
pass: 'world',
message: 'Login with user:"hello" pass:"world"'
}
},
method: {
get: function world($done)
{
$done( { hello: "world" } );
}
}
routes: [
{
api: '/hello',
required: {
'auth-basic': {
user: 'hello',
pass: 'world',
message: 'Login with user:"hello" pass:"world"'
}
]
},
method: {
get: function world ($done) {
$done({ hello: 'world' });
}
}
}
]
});


// !-- FOR TESTS
module.exports = app;
// --!

0 comments on commit cd2d70c

Please sign in to comment.