1.0.7 • Published 9 years ago

atomiq v1.0.7

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

atomiq

c Join the chat at https://gitter.im/atomiqio/atomiq

Microservices with Docker and Node.js (ES6/7)

atomiq provides very lightweight structure and support useful for Express-based microservices. It is not a framework and doesn't get in the way of Express, but it does offer a nice convention for directory-based routing that you can use if you choose to.

Atomiq uses ES6 classes and ES7 async/await. See atomiq-cli for scaffolding microservice packages with full Babel and Docker support.

Routing

Automatic routing is optional. Use the atomiq-cli to generate new projects and examine the sample routes.

Routes are ES6 modules that export a default class.

If you decide to add a constructor to your class, make sure to call super(app):

default export class MyRoute extends Route {
  constructor(app) {
    super(app);

    // you have access to the app and the express router for this route
    this.app ...
    this.router ...
  }
}

All Express/HTTP methods are supported. Any method matching a verb name is automatically added to the router for this route. If you need to use an HTTP verb that is not a valid JavaScript name (there is only one: 'm-search'), you will need to attach it to this.router in the constructor:

this.router['m-search'](req, res) {
  ...
}
1.0.7

9 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.0.18

10 years ago

0.0.17

10 years ago

0.0.16

10 years ago

0.0.15

10 years ago

0.0.14

10 years ago

0.0.13

10 years ago

0.0.1

11 years ago