Skip to content

Primate

An expressive, minimal and extensible framework for JavaScript.

Quick start

Create a couple of routes in routes/hello.js.

import htmx from '@primate/htmx';

export default router => {
  router.get('/', () => htmx`<index-htmx />`); 
  router.post("/hello", () => "Hi");
};

Create a component in components/index-htmx.html.

<button hx-post="/hello" hx-swap="outerHTML">
  Click me
</button>

Generate package.json by executing npm init -y.

Add {"type": "module"} to the package.json.

Run npm i @primate/htmx && npx primate@latest -y.

Visit http://localhost:6161.

Resources

  • Website: https://primatejs.com
  • IRC: Join the #primate channel on irc.libera.chat.

License

MIT