sbx-rest-gateway

0.7.8 • Public • Published

Downloads

Rest Moleculer NPM version

Moleculer is a fast, modern and powerful microservices framework for Node.js. It helps you to build efficient, reliable & scalable services. Moleculer provides many features for building and managing your microservices.

Website: https://moleculer.services

Documentation: https://moleculer.services/docs

Requirements

  • node >= 10
  • sbx >=0.9.1

Peer dependencies

Installation

$ npm install sbx-rest-gateway

Use package:

     'get.tournaments.list':{
            route:{
                method: "GET",
                path: 'tournaments/list(/)',
                name: 'Sessions count',
                description: 'Get Sessions count',
                group: 'Tornaments',
                accessGroups: ['tornament'],
                access: ['admin','manager','brand'],
                cache:{
                    ttl: 3600 //seconds,
                    key: ["limit","id"] //get from params and serialize to hash key,
                    type: "cron" // cron | timeline default timeline 
                }
            },
            params: {
                //Parting
                limit: {type: 'number', max:100, min:1, default:20, optional: true, description: '1'},
                offset: {type: 'number', optional: true, default:0, description: '10'},
              
            },
            async handler(){
            }
     }

Readme

Keywords

none

Package Sidebar

Install

npm i sbx-rest-gateway

Weekly Downloads

163

Version

0.7.8

License

none

Unpacked Size

53.6 kB

Total Files

6

Last publish

Collaborators

  • v.sobix