Overview

PocketPages is an EJS preprocessor for PocketBase. It's like being able to run old-school PHP files, but using JS and PocketBase instead.

Use PocketPages to create slim and modern web apps:

  • Start small and iterate
  • SEO-first principals
  • Zero dependencies
  • No build step
  • Fast server-side rendering

Hello world in just one file

To get started, you need just one file:

// index.ejs
<%= `Hello, world!` %>
http://localhost:8090
Hello, world!

With PocketPages, making apps is easy again. Inside <% and %>, you have the full power of JavaScript plus PocketBase's JSVM which defines all of PocketBase's built-in functions.

Retro file-based routing

PocketPages borrows inspiration from SvelteKit's file-based routing architecture, so you can do this:

// +layout.ejs
<html>
    <body style="background-color: #b5dcb5">
        <%- slot>
    </body>
</html>
http://localhost:8090
Hello, world!