Skip to content

An example endpoint built using Merapi, the JavaScript framework for microservices made by Kata.ai

License

Notifications You must be signed in to change notification settings

resir014/merapi-starter-kit

Repository files navigation

merapi-starter-kit

An example endpoint built using Merapi, the JavaScript framework for microservices made by Kata.ai

Getting started

Prerequisites

  • Node.js (8.0+)
  • Yarn - optional, you can use npm if you want

Running locally

First, make a copy of the .env.example file and name it .env. This file will be used to host our environment variables, e.g. service URL, port, etc.

Then, install the required dependencies using your preferred package manager.

yarn

# or, for npm:
npm install

And finally, run the following command to start the TypeScript watcher + Merapi server.

npm run watch

Your server now lives at the port that you set on your .env file (defaults to 9300).

Example endpoints

  • GET / (and GET /info) - simple healthcheck
  • GET /api/v1/hello - returns a JSON payload with hello message
  • GET /api/v1/hello/:toWho - same as above, but with a customisable param

Deploying

If you use now, this repository is instantly deployable. Just click the button below.

Deploy to now

Now has its own way to manage environment variables and deployment secrets. To learn more about it, follow this guide.

Once you've created a secret through the Now CLI, include it in your now.json as follows:

{
  "env": {
    "ENV_VARIABLE": "@secret-name"
  }
}

More deployment guides for other environments will be made available when needed.

About

An example endpoint built using Merapi, the JavaScript framework for microservices made by Kata.ai

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published