runkit-api
v1.0.2
Published
Interact with the runkit API
Downloads
3
Readme
runkit-api
Interact with the runkit API from Node
Usage
const { Endpoint } = require("runkit-api");
const API = new Endpoint();
await API.ready(); // The construction is handled asynchronously, so it is best to call .ready before proceeding.
API.setEndpointCallback(function(request, response) { // Thiscan be either a function, or a string of a function that should be called whenever the endpoint receives a request.
response.end("Hello world!");
});
console.log(API.url);