FUNCTIONS / DOCUMENTS / SESSIONS

A function.
An endpoint.

Export your JavaScript function. Run it on Veloce. Use the same app from every client.

Browser / JavaScript / curl

Dithered geometric study for the Blueprint designDithered geometric study for the Blueprint design
DEHOOK / 04 Ordered dither / matrix 4 x 4
JavaScript functionsBrowser + local JavaScriptExport to HTTPJSON documents
FROM ZERO TO HELLO

A backend in a few lines.

Your tokens are already configured.
Pick where you want to start.

1

Add Dehook to your HTML

Copy this configured snippet into your development page.

index.html
Preparing your browser snippet
2

Export a function. Then run it.

Use your page's console, or try it in the sandbox.

JavaScript
dehook.export(function hello(data) {
  return { response: `Hello ${data.name}!` };
});

dehook.run('hello', { name: 'Ada' }, (response, error) => {
  if (error) return console.error(error.message);
  console.log(JSON.parse(response));
});

The development snippet includes your private token. Remove it from HTML before sharing your app.

LOCAL JAVASCRIPT

Start locally with require.

Copy, paste, run.
The same app as your browser.

1

Download the client for this app

The same app, functions, and documents as your browser. Tokens are included.

Terminal
Preparing your download
2

Copy this into app.js

Same API. Save this next to dehook.js.

app.js
const dehook = require('./dehook.js');

dehook.export(function hello(data) {
  return { response: `Hello ${data.name}!` };
});

dehook.run('hello', { name: 'Ada' }, (response, error) => {
  if (error) return console.error(error.message);
  console.log(JSON.parse(response));
});
Node.js
node app.js
Veloce
veloce --allow-read=. --allow-net=dehook.me app.js
KEEP GOING

Small API. Room to build.

Backend settings

These settings apply to the app selected in Your workspace.

Credentials and client

App identifier
Keep this private
Download client

Backends in this browser

New backend creates a separate app. Previous apps stay in the app selector. Save your credentials before clearing browser storage.

Rotate this app's private token

Existing private keys will stop working. Download the client again after rotating.

Use an existing token pair