ORM Studio

Getting Started with ORM Studio

How to install, set up, and launch Axil ORM Studio.

2 min readDocumentationEdit this page

Getting Started

Requirements

  • @axiljs/cli installed globally
  • A project created with axil create or manually configured
  • better-sqlite3, pg, or mysql2 installed (matching your database driver)

Installation

Studio is included as an optional dependency of @axiljs/cli. Install it in your project:

Terminal
npm install @axiljs/studio

If you are using a local monorepo development setup, link it instead:

Terminal
# In the AxilJS monorepo
cd packages/studio
npm link
# In your project
npm link @axiljs/studio

Launch

Studio launches automatically when you start the development server:

Terminal
axil run

You do not need to run any separate command. Studio opens in your browser automatically.

Manual Access

If the browser does not open automatically, navigate to:

typescript
http://localhost:3001

Replace 3001 with your app port + 1 if you use a non-default port.

Port Configuration

Studio always runs on APP_PORT + 1.

App PortStudio Port
3000 (default)3001
40004001
80808081

To change the app port, set PORT in your .env:

env
PORT=4000

Studio will automatically use port 4001.

Project .env Setup

Studio reads your .env file to detect and connect to your database:

env
# SQLite
DATABASE_FILENAME=./dev.db
 
# PostgreSQL
DATABASE_URL=postgres://username:password@localhost:5432/mydb
 
# MySQL
DATABASE_URL=mysql://username:password@localhost:3306/mydb

Verify Installation

After running axil run, you should see this output:

typescript
12:00:02 [AxilJS Studio] http://localhost:3001

Open the URL and you will see the Studio dashboard with your routes and database tables.

Troubleshooting

Studio not starting

Check that @axiljs/studio is installed in your project:

Terminal
node -e "require('@axiljs/studio')"

If this errors, install it:

Terminal
npm install @axiljs/studio

Database tables not showing

  • Make sure your .env has the correct DATABASE_FILENAME or DATABASE_URL
  • For SQLite, make sure the .db file exists (it is created when your app first starts)
  • Studio retries the database connection up to 5 times with 2-second delays

Port already in use

If port 3001 is in use, change your app port in .env:

env
PORT=3005
# Studio will use 3006

Help improve the documentation

AxilJS is open source and documentation improvements are welcome.

AxilJS DocumentationMIT License · Built by SyntaxilitY