epsilon-runner

0.0.1 • Public • Published

Epsilon - Cloud Functions Wrapper Server

Note: For context visit https://github.com/deve-sh/epsilon.

Provides the wrapper functionality around the user's Express controller implementation.

Also takes care of setting up logging interceptors and passing them to the VM's core logging API for sending to the Cloud.

How to test and develop

Create a test.js file and define your cloud functions as:

module.exports.functionName = {
	definition: async (req, res) => {
		return res.status(200).send("Hello");
	},
	config: {},
};

Run npm run start

Local usage for consumers of Epsilon

This functionality will be abstracted, all the consumers have to do is define an index.js file, and run npx epsilon-runner.

This will start the local functions wrapped by Express.

At Build-time

At build-time, this folder is mixed with the contents of the user's repository and a Docker container is generated per function, that Docker container is then uploaded and pulled into a VM for execution of that function in isolation.

The command to run the Express server with a single function in build mode inside the Docker container would be:

# For bypassing confirmation | ... | <mode> <path> <functionName>
yes | npx epsilon-runner build ./index getTimestamp

Readme

Keywords

none

Package Sidebar

Install

npm i epsilon-runner

Weekly Downloads

1

Version

0.0.1

License

MIT

Unpacked Size

4.05 kB

Total Files

3

Last publish

Collaborators

  • d_e_v.e_s_h