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.
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
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, 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