0.10.7 • Published 7 months ago

moleculer-web v0.10.7

Weekly downloads
11,803
License
MIT
Repository
github
Last release
7 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-users@infinitebrahmanuniverse/nolb-mol@learn-chinese-platform/gateway@learn-chinese-platform/services@pojntfx-incubator/social-media-feeds-gatewayf800-core@everything-registry/sub-chunk-2194will-apiwill-authwill-corestorage-io-service@colucom/osseus-moleculerweb@diia-inhouse/diia-appjsbattle-serverlbl-team-base-servicelang-featurestudio-servicestretchshopstromdao-eaftydids-ssi-consent-routertu_project_base_model@aura-network/moleculer-common@activitypods/core@fisas/ms_core@fooddyshop/backend@geut/permanent-seeder-sdk@geniux14/service-gateway@ludeo.com/ludeo-platform-common@mas-soft/mas-core-server@kant2002-diia-inhouse/diia-app@putty_king/auth@putty_king/cacher@pimex/gateway@semapps/ldp@semapps/signature@semapps/solid@semapps/sparql-endpoint@semapps/auth@semapps/connector@semapps/core@semapps/crypto@semapps/activitypubmoleculer-slack-events-apimoleculer-starter-kitmoleculer-plusmoleculer-practisenalia-moleculer-starter-kitow-connect-v1ouistity-moleculer-starterouistity-moleculer-starter-kitpandarappopo-sobnode-red-contrib-moleculernode-red-contrib-moleculer-v2qredit-service-frameworkimicros-coreimicros-gatewayheroculer-demoinvest-wrapper-serviceleapic-base-service@zalastax/nolb-mol@zlucy/lucy-apiale-moleculer-crud-mixinale-moleculer-firebaseale-firebasecbb-plugincubable-backend-sdkeaf_mqtt_clientfcommon@smart-matrix/moleculer-gundb@steedos/node-red-contrib-steedos@steedos/service-api@steedos/service-steedos-server@steedos/service-metadata@steedos/service-metadata-apps
0.11.0-beta1

7 months ago

0.10.7

2 years ago

0.10.6

2 years ago

0.10.5

3 years ago

0.10.4

3 years ago

0.10.3

4 years ago

0.10.2

4 years ago

0.10.1

4 years ago

0.10.0

4 years ago

0.10.0-beta4

4 years ago

0.10.0-beta3

4 years ago

0.10.0-beta2

4 years ago

0.10.0-beta1

5 years ago

0.9.1

5 years ago

0.9.0

5 years ago

0.9.0-rc1

5 years ago

0.9.0-beta7

6 years ago

0.9.0-beta6

6 years ago

0.9.0-beta5

6 years ago

0.9.0-beta4

6 years ago

0.9.0-beta3

6 years ago

0.9.0-beta2

6 years ago

0.9.0-beta1

7 years ago

0.8.5

7 years ago

0.8.4

7 years ago

0.8.3

7 years ago

0.8.2

7 years ago

0.8.1

7 years ago

0.8.0

7 years ago

0.8.0-rc1

7 years ago

0.8.0-beta3

7 years ago

0.8.0-beta2

7 years ago

0.8.0-beta1

7 years ago

0.7.0-beta5

7 years ago

0.7.0-beta4

7 years ago

0.7.0-beta3

7 years ago

0.7.0-beta2

7 years ago

0.7.0-beta1

7 years ago

0.6.4

7 years ago

0.6.3

7 years ago

0.6.2

7 years ago

0.6.1

7 years ago

0.6.0

7 years ago

0.6.0-beta7

8 years ago

0.6.0-beta6

8 years ago

0.6.0-beta5

8 years ago

0.6.0-beta4

8 years ago

0.6.0-beta3

8 years ago

0.6.0-beta2

8 years ago

0.6.0-beta1

8 years ago

0.5.2

8 years ago

0.5.1

8 years ago

0.5.0

8 years ago

0.4.4

8 years ago

0.4.3

8 years ago

0.4.2

8 years ago

0.4.1

8 years ago

0.4.0

8 years ago

0.3.3

8 years ago

0.3.2

8 years ago

0.3.1

8 years ago

0.3.0

8 years ago

0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago