Bunary is v0.x and under active development — APIs may still move between minor releases.

    Examples

    Explore complete working examples to see Bunary in action.

    Explore complete working examples to see Bunary in action. All examples are available in the bunary-dev/examples repository.

    Running Examples Locally

    Clone the examples repository and run any example:

    git clone https://github.com/bunary-dev/examples.git
    cd examples
    

    Available Examples

    Basic API

    A simple REST API demonstrating core Bunary features.

    Features covered:

    • Route definition with createApp()
    • Path parameters (:id syntax)
    • Query parameters
    • JSON serialization
    • Middleware pipeline
    • Environment helpers
    cd basic-api
    bun install
    bun run dev
    

    View source on GitHub →


    Nested Routes

    Organized routes across multiple files using route groups and modular structure.

    Features covered:

    • Route groups with prefixes
    • Splitting routes into separate files
    • Shared middleware per group
    • Clean project organization
    cd nested-routes
    bun install
    bun run dev
    

    View source on GitHub →


    Basic ORM

    Database integration example using Bunary ORM with SQLite.

    Features covered:

    • Database configuration
    • Model definitions
    • Query builder usage
    • CRUD operations
    • Relationships
    cd basic-orm
    bun install
    bun run dev
    

    View source on GitHub →


    Contributing Examples

    Have an example you'd like to share? We welcome contributions! Open a pull request on the examples repository.

    Last updated