Skip to content

Instantly share code, notes, and snippets.

@travist
Created January 28, 2016 03:40
Show Gist options
  • Save travist/2eae831b8ca266bbab4f to your computer and use it in GitHub Desktop.
Save travist/2eae831b8ca266bbab4f to your computer and use it in GitHub Desktop.
Form.io Node.js Remote Middleware Binding
var formio = require('formio-service')();
var Project = formio.Project;
// First authenticate.
formio.authenticate('[email protected]', 'password').then(function() {
// Create a new project instance.
var project = new project('https://myapp.form.io');
// Bind to a form.
project.bind('myform', 'POST', function(error, request, response) {
console.log(request);
/**
* You can also change the response by doing the following...
*/
response({
status: 404,
message: 'This is a custom message'
});
}, true);
});
Copy link

ghost commented Mar 6, 2020

the code does not run anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment