A web runtime for JavaScript and TypeScript.

No build. No framework.
No bull.

Write server code inside your HTML, save the file, and refresh. Routing, forms, sessions, and a database come built in.

Free-range and open source · Still growing

One file. Front to back.

The form and the code that answers it, together.

welcome.cow
<?js
import { field } from 'cow:web'
let name = 'friend'
if (req.method() === 'POST') {
  const form = await req.formData()
  const value = field(form, 'name')
  name = value.trim().slice(0, 60) || 'friend'
}
?>
<h2>Hello, <?= h(name) ?>!</h2>
<form method="post">
  <label>Your name
    <input name="name" maxlength="60"
      placeholder="Clover">
  </label>
  <button>Say hello</button>
</form>

Hello, friend!

Give Cow a name to say hello to.

The code runs on the server. The HTML goes to the browser.

See how pages are written

Your files
know the way.

Pages get their URLs from your files and folders. Add a Cow file to your site and it’s ready to visit. No router to set up.

How pages work
In your siteIn your browser
index.cow/
about.cow/about
blog/index.cow/blog/
cow site
_greetings.cow
<?js
export function greet(name) {
  return `Hello, ${name}!`
}
index.cow
<?js
import { greet } from './_greetings.cow'
?>
<h1><?= h(greet('Clover')) ?></h1>

Start small.
Room to graze.

One file is a fine place to start. As your app grows, share code with modules and reuse HTML with includes.

How modules and includes work

Coming from PHP? You’ll feel at home.

JavaScriptTypeScript

Speak your language.

JavaScript or TypeScript, in pages and modules.
Cow runs either without a separate build step.

See JavaScript and TypeScript support
npm

Bring the herd.

Keep using familiar npm packages.
Install them, then import them in your Cow code.

See package support

Pick your pasture.

Run Cow with the JavaScript runtime you prefer.

cow site --runtime node
Runtime support and setup

Fresh from
the field.

Take a look around a working Cow app.
See how the pieces fit together.

Browse examples

Got an idea?
Let it loose.

Make your first page. See where it takes you.

Free, open source, and still growing.