hyper.io
v0.7.7
Published
MicroServices so fast they've gone plaid!
Downloads
131
Maintainers
Readme
Features
- Auto Service Discovery
- Encourage Modular based design
- Services
- Controllers
- Resolvers
- Resources
- Factories
- Adapters
- Modern
- DI
- Promises
- Streams
- Production Ready
- Session Management
- SSL Support
- Configuration Management
- Logging Management
- Secure
- Stats Collection
- Throttling/Service Protection
- Input Validation
- API Doc Generation
- Load tests
- Benchmarking Tools
- Middleware Plugins
- Plugin manager (yanpm)
- Configuration management (default: transfuser)
- Logging (default: stumpy)
- Template Engines (default: ejs)
- Monitor Server Stats (default: statsd)
- Authentication
- basic auth
- SSO (default: passport)
- CLI
- Keep Alive (default: forever)
- Scaffolding Generator
- Build/Package/Deploy
- Load tests
- Benchmarking Tools
Note: Bold items are on the roadmap, not in the current release.
Example
See Examples directory
API
Config Loading/Merge Order
- Built in config
- Current working directory (most likely, dir server was run in)
- config.json
- config.js
- <app/project name>.config.json
- <app/project name>.config.js
- User home directory
- config.custom.json
- config.custom.js
- <app/project name>.config.custom.json
- <app/project name>.config.custom.json
Functions Dependency Injection
- $hyper: instance of the current hyper server
- $q: promise library used in hyper (default: when)
- _: util library used in hyper (default: lodash)
- $logger: logger library used in hyper (default: stumpy)
- $rawRequest: raw route request from httpFramework
- $rawResponse: raw route response from httpFramework
- $next: route next function
- $done: route done function
- $error: route error function
- $fatal: route fatal function
- $session: req.session
- $cookies: req.cookies
- $input
- $input.body: POST data
- $input.query: GET query data
- $input.params: GET query data
Releases
Current Release
- 0.6.0 - Release
- Service Export
- Added Resource Manager
- Lint Cleanup/Fixes
Next Release
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.x.0 - Release
- add Koa support
- Move Service router adapter to plugins and use external repos
- Examples:
- Auth middleware
- JWT
- Passport
- Auth middleware
- Input validation
- Express
- https://github.com/ctavan/express-validator
- https://github.com/petreboy14/express-joi
- Express
- Unit Tests
- Route Throttling
- Express
- https://github.com/ivolo/express-rate
- Express
- API Doc generation
- Express
- https://github.com/fliptoo/swagger-express
- Express
- CLI
- Keep Alive
- Forever - https://github.com/foreverjs/forever
- PM2 - https://github.com/Unitech/pm2
- Add API Doc generation
- Create Route for a Controller
- Create Basic Server with Service
- Build/Package/Deploy
- Keep Alive
- Support Clustering
- 2.0.0 - Release
- Load tests
- Benchmarking Tools
- Polish and bug fixes
- More Documentation
- How To
- Server production setup
- Update API
- How To
- Push to Service Store
Prev Release(s)
0.2.0 - Release
- Add Resolvers
- Add middleware system
- Add required option to route
- Add basic auth middleware
0.3.0 - Release
- Add Resource type
- Resource Examples
- Basic
- SQLite
- Add Resource per Service
- Resource Examples
- Add Multi Service Example
- Single File
- Multi File
- Add Basic Auth Example
- Add Config Examples
- Add DI to Services and Controllers Constructors
- API Tests
- Routes
- Controllers
- Services
- Resolvers
- Resources
- Custom paths
- Add Resource type
0.4.0 - Release
- Update Dependencies
- Add Service Router
- Add HTTP Adapter
- Add $services DI
- .find(<service name>)
- .get(<route>, [<query/hash data URL format>])
- Add tests for all examples
- Add auto-exec $init function waiting on return promise
- Examples
- External Services
- 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