Have ideas to improve npm?Join in the discussion! ¬Ľ

    @pan-os/heimdall

    1.0.3¬†‚Äʬ†Public¬†‚Äʬ†Published

    Heimdall CI status

    An organizational and modular approach to handle pseudo microservices into restify applications.

    Motivation

    The whole idea behind this project is to allow you to manage your API using a structure easy to maintain and split into several packages, heimdall wants to transform your mindset to microservices and help you to keep everything in place.

    Installation

    $ yarn add @pan-os/heimdall

    Requirements

    TBD

    • Restify

    Usage

    Routes entrypoint

    /**
     * Module Dependencies
     */
    const Heimdall = require('heimdall');
    /**
     * Pseudo microservices
     */
    const { user } = require('../services');
     
    module.exports = (server) => {
      // Attach microservices to /
      Heimdall.attachMicroservice(server, user);
    };

    Services folder structure

    Represents your microservices

    Example Service Structure

    // index.js
     
    module.exports = [
      {
        method: 'post',
        path: '/user/register',
        action: (req, res, next) => { ... }
      }
    ];
     
    // And you will be able to do a post to http://localhost:3000/user/register and 
    // also should be able to manipulate/create your response into your action callback

    Development

    $ yarn start:[env] (dev, prod)
    

    Contributors ūüéČ

    Thanks goes out to all these wonderful people (emoji key):


    Sérgio Freitas

    Contributing

    Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

    Please make sure to update tests as appropriate.

    License

    MIT

    Install

    npm i @pan-os/heimdall

    DownloadsWeekly Downloads

    1

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    135 kB

    Total Files

    10

    Last publish

    Collaborators

    • avatar