Skip to the content.

OneBlink API CLI

Local Development

Once you have written your handlers and setup the required routes, you are able to serve you code locally using the CLI serve command.

serve Command

oneblink api serve

Options

Examples

BYO AWS Credentials

When running the OneBlink API CLI serve command, AWS Credentials are retrieved and used to allow you to communicate with AWS with limited restrictions. If you require access to more AWS services than the defaults, OneBlink are able to provide you with AWS credentials that you can use during local development to mirror your deployed AWS privileges.

Configuration

The property awsProfile can be added to your projects .blinkmrc.json file, which will be use as AWS_PROFILE variable only during local development.

{
  "server": {
    "awsProfile": "name-of-profile"
  }
}

Follow these steps to setup an AWS Profile

  1. Contact OneBlink for AWS credentials for development purposes. Ensure you notify us of any specific privileges you believe you may need.

  2. Install the AWS CLI

    • Windows
    • Mac (We recommend installing with brew)
      brew install awscli
      
  3. Create an AWS Profile

  4. Manually update your .blinkmrc.json file with the awsProfile property