0.10.7 • Published 5 months ago

moleculer-web v0.10.7

Weekly downloads
11,803
License
MIT
Repository
github
Last release
5 months ago

Moleculer logo

Node CI Coverage Status Codacy Badge Maintainability David Known Vulnerabilities Join the chat at https://gitter.im/moleculerjs/moleculer

Official API Gateway for Moleculer framework NPM version

The moleculer-web is the official API gateway service for Moleculer. Use it to publish your services.

Features

  • support HTTP & HTTPS
  • serve static files
  • multiple routes
  • support global, route, alias middlewares
  • support file uploading
  • alias names (with named parameters & REST shorthand)
  • whitelist
  • multiple body parsers (json, urlencoded)
  • CORS headers
  • ETags
  • HTTP2
  • Rate limiter
  • before & after call hooks
  • Buffer & Stream handling
  • middleware mode (use as a middleware in ExpressJS Application)
  • support authorization

Install

npm install moleculer-web --save

Usage

Run with default settings

This example uses API Gateway service with default settings. You can access to all services (including internal $node.) via http://localhost:3000/

let { ServiceBroker } = require("moleculer");
let ApiService = require("moleculer-web");

let broker = new ServiceBroker({ logger: console });

// Create a service
broker.createService({
    name: "test",
    actions: {
        hello() {
            return "Hello API Gateway!"
        }
    }
});

// Load API Gateway
broker.createService(ApiService);

// Start server
broker.start();

Test URLs:

  • Call test.hello action: http://localhost:3000/test/hello

  • Get health info of node: http://localhost:3000/~node/health

  • List all actions: http://localhost:3000/~node/actions

Documentation

Please read our documentation on Moleculer site

Test

$ npm test

In development with watching

$ npm run ci

License

Moleculer-web is available under the MIT license.

Contact

Copyright (c) 2016-2021 MoleculerJS

@moleculerjs @MoleculerJS

towa-servicesstretchshop-basebanking-service-ts@openbanking/broker@openbanking/mixin-gateway@openbanking/ms@openbanking/ms-account-requests@openbanking/ms-accounts@openbanking/ms-beneficiaries@openbanking/ms-beneficiarys@openbanking/ms-consents@openbanking/ms-customers@openbanking/ms-data@openbanking/ms-direct-debits@openbanking/ms-oauth@openbanking/ms-oauth-consent@openbanking/ms-offers@openbanking/ms-parties@openbanking/ms-partys@openbanking/ms-payment-submissions@openbanking/ms-payments@openbanking/ms-scheduled-payments@openbanking/ms-standing-orders@openbanking/ms-statements@openbanking/ms-transactions@openbanking/ms-usersavanta@infinitebrahmanuniverse/nolb-mol@learn-chinese-platform/gateway@learn-chinese-platform/services@pojntfx-incubator/social-media-feeds-gatewayf800-core@everything-registry/sub-chunk-2194eaf_mqtt_client@semapps/signature@semapps/sparql-endpoint@semapps/ldp@semapps/activitypub@semapps/auth@semapps/connector@semapps/coreouistity-moleculer-starterouistity-moleculer-starter-kitow-connect-v1panda@ludeo.com/ludeo-platform-commoncbb-plugincubable-backend-sdknode-red-contrib-moleculernode-red-contrib-moleculer-v2@smart-matrix/moleculer-gundbwill-core@pimex/gateway@steedos/node-red-contrib-steedos@steedos/service-metadata-tabs@steedos/service-metadata-translations@steedos/service-metadata-triggers@steedos/service-steedos-server@steedos/service-metadata-apps@steedos/service-metadata-layouts@steedos/service-metadata-objects@steedos/service-metadata-permissionsets@steedos/service-metadata@steedos/service-apiwill-apiwill-auth@kant2002-diia-inhouse/diia-appmoleculer-plusmoleculer-practise@fisas/ms_core@fooddyshop/backendnalia-moleculer-starter-kit@putty_king/auth@putty_king/cacherheroculer-demofcommonlbl-team-base-serviceleapic-base-servicelang-featureimicros-gatewayinvest-wrapper-service@colucom/osseus-moleculerwebstorage-io-servicestromdao-eafstretchshopjsbattle-servermoleculer-slack-events-apimoleculer-starter-kit@geniux14/service-gateway@geut/permanent-seeder-sdk@mas-soft/mas-core-servertu_project_base_modelrappopo-sobqredit-service-framework@activitypods/core@zalastax/nolb-mol@zlucy/lucy-api@aura-network/moleculer-commonale-moleculer-firebaseale-firebase
0.10.7

5 months ago

0.10.6

9 months ago

0.10.5

1 year ago

0.10.4

2 years ago

0.10.3

3 years ago

0.10.2

3 years ago

0.10.1

3 years ago

0.10.0

3 years ago

0.10.0-beta4

3 years ago

0.10.0-beta3

3 years ago

0.10.0-beta2

3 years ago

0.10.0-beta1

4 years ago

0.9.1

4 years ago

0.9.0

4 years ago

0.9.0-rc1

4 years ago

0.9.0-beta7

4 years ago

0.9.0-beta6

5 years ago

0.9.0-beta5

5 years ago

0.9.0-beta4

5 years ago

0.9.0-beta3

5 years ago

0.9.0-beta2

5 years ago

0.9.0-beta1

5 years ago

0.8.5

5 years ago

0.8.4

5 years ago

0.8.3

5 years ago

0.8.2

6 years ago

0.8.1

6 years ago

0.8.0

6 years ago

0.8.0-rc1

6 years ago

0.8.0-beta3

6 years ago

0.8.0-beta2

6 years ago

0.8.0-beta1

6 years ago

0.7.0-beta5

6 years ago

0.7.0-beta4

6 years ago

0.7.0-beta3

6 years ago

0.7.0-beta2

6 years ago

0.7.0-beta1

6 years ago

0.6.4

6 years ago

0.6.3

6 years ago

0.6.2

6 years ago

0.6.1

6 years ago

0.6.0

6 years ago

0.6.0-beta7

6 years ago

0.6.0-beta6

6 years ago

0.6.0-beta5

6 years ago

0.6.0-beta4

6 years ago

0.6.0-beta3

6 years ago

0.6.0-beta2

6 years ago

0.6.0-beta1

6 years ago

0.5.2

7 years ago

0.5.1

7 years ago

0.5.0

7 years ago

0.4.4

7 years ago

0.4.3

7 years ago

0.4.2

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.3

7 years ago

0.3.2

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago