0.6.10 • Published 1 year ago

@funcie/client v0.6.10

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Funcie Client

This package provides a wrapper for Lambda functions to utilize Funcie.

Funcie is a framework for easier local development of Lambda functions. It allows you to run your Lambda functions locally, and automatically forward requests to the Lambda function when it is deployed.

Usage

First, you will need to set up funcie. See the instructions in the readme at the root of this repository.

Next, you will need to install the funcie client package:

npm install --save @funcie/client

Then, simply import it and wrap your existing Lambda handler along-side a user-defined application name:

const { lambdaWrapper } = require("@funcie/client");

exports.handler = lambdaWrapper('app-name', async (event) => {
  // Your existing Lambda handler code here
});

Now if you run your Lambda locally, the deployed Lambda will automatically invoke your local code when hit.

You may find it useful to use the --watch flag when running your Lambda locally, so that it will automatically reload when you make changes:

node --watch src/index.js

Configuration

The funcie client can be configured via environment variables:

  • FUNCIE_CLIENT_BASTION_ENDPOINT (optional): The endpoint for the client bastion -- defaults to http://localhost:27193.
  • FUNCIE_SERVER_BASTION_ENDPOINT: The endpoint for the server bastion (only used when not local).
  • FUNCIE_LISTEN_ADDRESS (optional): The address to listen on -- defaults to 0.0.0.0 on a random port).

Troubleshooting

By default, most errors will be logged to the console, with other logging disabled. Additional debug logging can be enabled via the FUNCIE_DEBUG environment variable:

FUNCIE_DEBUG=true node index.js
0.6.7

1 year ago

0.6.9

1 year ago

0.6.8

1 year ago

0.6.10

1 year ago

0.6.3

1 year ago

0.6.2

1 year ago

0.6.5

1 year ago

0.6.4

1 year ago

0.5.0

1 year ago

0.6.1

1 year ago

0.4.3

1 year ago

0.6.0

1 year ago

0.3.3

2 years ago

0.3.2

2 years ago

0.3.1

2 years ago

0.3.0

2 years ago

0.2.4

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.7

2 years ago

0.1.0

2 years ago