Get Started

Configure and run the gateway server.

1. Install the package

yarn add moleculer-api

Add moleculer-api package from npm.

2. Run the gateway

import { APIGateway, APIGatewayOptions } from "moleculer-api";

const options: APIGatewayOptions = {
    // ...
};
const gateway = new APIGateway(options);
gateway.start()
    .then(() => {
        // ...
    });

And write entry script like above. For now, let's skip setting detailed options.

3. Check the log and few endpoints

With default options configuration, A gateway will run on localhost 8080 port with HTTP protocol. And basic placeholder scheme for GraphQL plugin, playground for GraphQL and a default status check endpoint will be set.

  • http://localhost:8080/~status An endpoint to show the status each API integrations. It will show the integration status from oldest version to latest version with detailed integrations belong to each versions by each branches (only master branch initially).

Last updated

Was this helpful?