Quick Start
Build reproducible data and AI pipelines with executable Markdown
This guide will walk you through creating and deploying your first SQLPage application using Spry.
Make sure you've completed the installation steps before continuing.
Development Workflow
Follow these steps to generate SQLPage assets and start the development server:
SQLite Setup
Generate SQLPage Source Files
Generate the SQLPage source files from your Spryfile.md:
./spry.ts spc --fs dev-src.auto --destroy-first --conf sqlpage/sqlpage.jsonStart Development Server
Run Spry in watch mode for live reloading:
./spry.ts spc --fs dev-src.auto --destroy-first --conf sqlpage/sqlpage.json --watchAuto-Reload
The --watch flag automatically regenerates files when your Spryfile.md changes!
Start SQLPage Server
Launch the SQLPage server:
SQLPAGE_SITE_PREFIX="" sqlpageYour application will be available at http://localhost:8080
PostgreSQL Setup
Set Database Connection
Configure your PostgreSQL connection string:
export DATABASE_URL="postgresql://user:password@localhost:5432/mydb"Generate SQLPage Source Files
./spry.ts spc --fs dev-src.auto --destroy-first --conf sqlpage/sqlpage.jsonStart Development Server
./spry.ts spc --fs dev-src.auto --destroy-first --conf sqlpage/sqlpage.json --watchDeploy to Database
./spry.ts task deployStart SQLPage Server
SQLPAGE_SITE_PREFIX="" sqlpageYour First Spryfile
The Spryfile.md is where you define your application. Here's a simple example:
# My First Spry App
## Database Setup
```bash prepare-db --descr "Initialize database"
sqlite3 app.db < schema.sql
```
## Home Page
```sql index.sql
SELECT 'text' AS component,
'Welcome to Spry!' AS title,
'This is my first SQLPage app' AS contents;
```Understanding the Workflow
1. Write in Markdown
Define your application logic, routes, and tasks in Spryfile.md
2. Generate Assets
Spry converts your Markdown into SQLPage-compatible files
3. Deploy
Run tasks and deploy your application to the database
4. Serve
SQLPage serves your application directly from the database
Next Steps
Learn more about Executable Markdown to understand how to write powerful Spryfiles.
How is this guide?
Last updated on