Skip to main content
This guide will help you set up a new Orionjs project quickly by using our example repository.

Prerequisites

  • Bun (v1.0 or later) — the default runtime
  • MongoDB (local instance or connection string)
  • Basic knowledge of TypeScript
Node.js (v22+) is also supported. See Using Node.js instead of Bun below.

Using the Example Project

The fastest way to get started with Orionjs is to use our example project. It provides a fully functioning application that demonstrates the core features and best practices.

Project Structure

The example project follows the standard Orionjs structure:
For a more detailed explanation of the project structure, check out our Project Structure guide.

Running the Application

Before running the application, make sure you have MongoDB running. The example project is configured to connect to mongodb://localhost:3003/example by default. You can start the application in development mode using:
The application will start with Bun’s built-in watch mode. Any file changes will automatically restart the server. You can access it at http://localhost:3010.

Using Node.js Instead of Bun

If you prefer to use Node.js, pass the --node flag to any CLI command:
When using Node.js you’ll also need tsx installed in your project.

Key Features of the Example

The example project demonstrates several key features of Orionjs:
  • Component-based architecture
  • Configuration management
  • Environment variable handling
  • TypeScript integration
  • Project structure best practices

Learning from the Example

We recommend exploring the example code to understand:
  1. How components are organized and structured
  2. Configuration patterns for different environments
  3. The integration between different Orionjs modules
  4. How to set up and manage environment variables securely

Customizing the Example

After getting the example running, you can start customizing it:
  1. Create your own components following the same structure
  2. Add or modify HTTP controllers for REST endpoints
  3. Implement GraphQL resolvers and models
  4. Set up background jobs or event-driven features with Echoes
  5. Configure database connections for your specific needs

Next Steps

After exploring the example project, check out our other documentation sections to learn more about specific aspects of Orionjs: Happy coding with Orionjs!