Create a LumenJS project and start building with Lit web components, server loaders, and file-based routing.
A minimal LumenJS project looks like this:
Create lumenjs.config.ts in your project root:
export default { title: 'My App', integrations: [], // e.g. ['tailwind', 'nuralyui'] i18n: { // Optional - enable i18n locales: ['en', 'fr'], defaultLocale: 'en', prefixDefault: false, }, };
Create pages/index.ts. It automatically becomes the / route:
import { LitElement, html, css } from 'lit'; export class PageIndex extends LitElement { static styles = css` :host { display: block; padding: 2rem; } `; render() { return html`<h1>Hello, LumenJS!</h1>`; } }
Start the dev server with hot module replacement:
lumenjs dev --project ./my-app
Build and serve for production:
lumenjs build --project ./my-app lumenjs serve --project ./my-app --port 3000