Language

Run JavaScript scripts online, with no server

Export a main function and Waiso runs it on Bun 1.4 in an isolated sandbox. Each run keeps its inputs, output and logs, and the same code runs on a schedule, over HTTP or inside a flow.

Defaults type the inputs

Parameters are matched by name. With no types, the default decides: = 3 is a number, = true a toggle, = [] a list. A missing optional input arrives as undefined, so your default applies.

Learn more →
slugify.js
export async function main(title = 'Hello World', maxLength = 40) {
  const slug = title.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, '')
  console.log(`slug for "${title}"`)
  return { slug: slug.slice(0, maxLength) }
}

npm packages, installed for you

import and require are read from the code and each package is installed with bun install on the first run, then reused. The editor shows each import’s install state.

Learn more →

One function, three triggers

Publish it, then add a schedule with a cron expression in your time zone, turn on its endpoint, or use it as a flow step next to SQL queries and e-mails.

Learn more →

Questions

Does main have to be async?

No. A plain function works too: a returned promise is awaited and a plain value is used as it is. Returning nothing gives null.

Which version of a package is installed?

Its latest version, the first time a given code runs on a worker; the same code reuses that install afterwards.

How long can a run take?

5 minutes by default. Each script can raise it in Script settings, up to the installation’s ceiling — 1 hour unless an administrator changed it.

Related

Get started today

Ready to ship some scripts?

Create an account in seconds — no installers, nothing to set up.
Start building, testing and running your scripts right away.

  • Free to start
  • Self-host or cloud
  • Production ready