Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Installation

Note

Cloesce supports only TypeScript to TypeScript compilation as of Alpha v0.2.0. Support for additional languages will be added in future releases.

The simplest way to get a Cloesce project up and running is to use the create-cloesce template.

This template sets up a basic Cloesce project structure with all the necessary dependencies, configurations, example Models, and example tests to help get you started quickly. The template includes a sample HTML frontend with Vite which should be replaced with your frontend of choice.

Prerequisites

  1. Sign up for a Cloudflare account (not necessary for local development)
  2. Install Node.js (version 16.17.0 or later)

create-cloesce

To create a new Cloesce project using the create-cloesce template, run the following command in your terminal:

npx create-cloesce my-cloesce-app

After running this command, navigate into your new project directory:

cd my-cloesce-app

A simple project structure is created for you.

├── src/
│   ├── data/           # Example Cloesce Models
│   └── web/            # Frontend web assets
├── test/               # Unit tests for example Models
├── migrations/         # Database migration files
├── cloesce.config.ts # Cloesce configuration
└── package.json        # Project dependencies and scripts