Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

atomiq

Package Overview
Dependencies
Maintainers
4
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

atomiq

atomiq microservice support package

  • 1.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
20
increased by150%
Maintainers
4
Weekly downloads
 
Created
Source

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) {
  ...
}

Keywords

FAQs

Package last updated on 23 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc