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

Alpha Note: Cloesce supports only TypeScript to TypeScript compilation as of Alpha v0.1.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 and 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
  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 set up for you:

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