Installation
Get started with AbsoluteJS in minutes using the CLI or manual setup.
#Prerequisites
AbsoluteJS requires Bun version 1.2 or higher. If you don't have Bun installed, run:
BASH
curl -fsSL https://bun.sh/install | bashTo keep several Bun versions side by side, pin one per project, or use AbsoluteJS's patched builds, install Bun with bvm instead.
#Using create-absolutejs
The fastest way to start a new AbsoluteJS project is with the create-absolutejs CLI:
BASH
bun create absolutejs my-appYou can also specify options directly:
BASH
bun create absolutejs my-app --react --db postgresql --orm drizzleAvailable options include:
--reactAdd React; --svelte, --vue, --angular, --html and --htmx add the others (combine several)
--dbpostgresql, mysql, mariadb, sqlite, singlestore, cockroachdb, mssql, mongodb, gel, none
--ormdrizzle (every engine except mongodb and gel), prisma (every engine except singlestore and gel), none
--db-hostneon (postgresql), planetscale (postgresql or mysql), turso (sqlite)
--authabs to include @absolutejs/auth setup, or none
#Project Structure
A new AbsoluteJS project has this structure:
my-app/
build/Build output and compiled assets
db/DB and ORM related stuff
src/
backend/
handlers/Request handlers
plugins/Elysia plugins
assets/Static assets
server.tsElysia server entry point
frontend/
pages/Page components
components/Shared components
styles/CSS and styling files
types/TypeScript type definitions
absolute.config.tsAbsoluteJS build configuration
package.json
tsconfig.json
.env
#Manual Installation
To add AbsoluteJS to an existing project:
BASH
bun add @absolutejs/absolute elysia