C
CanxJS
v1.6.2
  • Learn
  • Blog
  • Showcase
C
CanxJS

Ultra-fast async MVC backend framework for Bun. Build production-ready APIs with elegance and speed.

Resources

  • Documentation
  • Learn
  • Blog
  • Showcase

Documentation

  • Introduction
  • Installation
  • Core Concepts
  • CLI Commands
  • API Reference

Legal

  • Privacy Policy
  • Terms of Service

© 2026 CanxJS. All rights reserved.

Built with ❤️ for Candra Kirana

Back to Learning Center
Beginner
15 min

Getting Started with CanxJS

Learn the basics of CanxJS and create your first application.

Getting Started with CanxJS

Welcome to CanxJS! In this tutorial, we will walk through creating your first ultra-fast web application.

Prerequisites

Before we begin, ensure you have the following installed:

  • Bun (v1.0 or higher)
  • Node.js (optional, for some tooling)

1. Creating a New Project

The easiest way to start is using the CLI generator. Open your terminal and run:

bash
bunx create-canx my-first-app

Follow the interactive prompts:

  • Project Type: Fullstack (MVC)
  • Language: TypeScript (Recommended)
  • Database: SQLite (Perfect for starting out)

2. Project Structure

Once created, let's look at the structure:

typescript
my-first-app/
├── src/
│   ├── app.ts           # Entry point
│   ├── controllers/     # Route handlers
│   └── views/           # JSX templates
├── package.json
└── tsconfig.json

3. Your First Route

CanxJS is designed to be simple. Open src/app.ts and add a basic route:

typescript
import { createApp } from "canxjs";

const app = createApp();

app.get("/", (req, res) => {
  return res.json({ message: "Hello from CanxJS!" });
});

app.listen();

4. Running the Server

Start your development server:

bash
bun run dev

Visit http://localhost:3000 in your browser, and you should see your JSON response!

Have questions?

Join the discussion on GitHub