Skip to main content
Orionjs comes with a built-in CLI tool that helps you start your application in production mode.

Deploying with Bun (Default)

Bun runs TypeScript directly, so no build step is needed.
  1. Install dependencies
    bun install
    
  2. Start the server
    bunx orion prod
    
    This will run bun ./app/index.ts directly in production mode.

Deploying with Node.js

When deploying with Node.js, the CLI will automatically build your app before starting.
  1. Install dependencies
    npm install
    
  2. Start the server
    npx orion prod --node
    
    This will compile the app with esbuild and then run node --import=tsx ./build/index.js. If you have a pre-compiled build, you can skip the build step:
    npx orion prod --node --path ./build
    

Environment Variables

Remember that you must set the environment variables needed to load the .env file before starting the server:
  • ORION_ENV_SECRET_KEY: The secret key used to decrypt your environment variables
  • ORION_ENV_FILE_PATH: Path to your encrypted environment file