Getting Started
Quick Setup
Create a new project:
example.bashbash
1# Using Deno2mkdir my-reface-app3cd my-reface-app4touch main.ts
Add dependencies:
example.typescripttypescript
1import { Reface } from "jsr:@vseplet/reface";
Create your first page:
example.typescripttypescript
1// main.ts2import { Reface } from "@reface";3import { Hono } from "@hono/hono";45const app = new Hono();67// Create layout8const Layout = component((_, children) => (9 <html>10 <head>11 <title>My First Reface Apptitle>12 head>13 <body>{children}body>14 html>15));1617// Create page18function HomePage() {19 return (20 <div class="container">21 <h1>Welcome to Reface!h1>22 <p>This is your first pagep>23 div>24 );25}2627// Initialize Reface28const reface = new Reface({29 layout: Layout,30});3132// Setup routes33app.route("/", reface.page("/", HomePage).hono());3435// Start server36Deno.serve(app.fetch);
Run the app:
example.bashbash
1deno run -A main.ts
Next Steps
Learn about Main Concepts
Explore API Reference
Check out Examples