Skip to content

thomas3577/alpine-server

Repository files navigation

@dx/alpine-server

JSR Version JSR Score ci

⚠️ EXPERIMENTAL: This library is in early development and highly experimental. APIs may change without notice. Not recommended for production use.

A secure, production-ready Oak (Deno) web server optimized for serving Alpine.js applications with built-in development tools, security hardening, and automatic hot-reloading.

Versions

  • Oak: v17.2.0
  • Alpine.js: v3.15.8 (default configuration)

Example

import { AlpineApp } from '@dx/alpine-server';

const app = new AlpineApp({
  app: {
    dev: true,
    staticFilesPath: './public',
  },
  oak: {
    listenOptions: { port: 3000 },
  },
});

await app.run();

CLI

Create a new Alpine Server project scaffold:

deno run -A jsr:@dx/alpine-server/cli new my-app

Or with Deno 2.7+ create templates:

deno create jsr:@dx/alpine-server -- my-app

With options:

deno run -A jsr:@dx/alpine-server/cli new my-app --port 3000 --force
deno create jsr:@dx/alpine-server -- my-app --port 3000 --force

Documentation

For more detailed information, please refer to the documentation in the docs folder:

License

MIT

Contributing

Contributions welcome!