@tutorbot/fission-helper
v1.0.0-dev
Published
The helper to run MQT handlers on fission environment.
Downloads
2
Keywords
Readme
@tutorbot/fission-helper
yarn add @tutorbot/fission-helper
environment variables
MONGODB_EVENT_USERNAME=username
MONGODB_EVENT_PASSWORD=password
MONGODB_EVENT_HOST=localhost
MONGODB_EVENT_PORT=27017
MONGODB_EVENT_DB=event
example
exports.fissionHttpHandler = require("@tutorbot/fission-helper")(async (data, context) => {
// data is the event
console.log(data, context);
// do something
// ...
// something went wrong
throw new Error("something went wrong")
});