Skip to main content

Local installation

Requirements

  • Install Node.js (version 22 or higher recommended) on your machine.
  • Create a new project with npm init
  • Install typescript in your project
  • Install tsx for debugging purpose :
  • npm i --save-dev tsx
  • Install orbits and fuel : npm i @orbi-ts/core @orbi-ts/fuel

Test with Docker-compose

Copy the following docker-compose.yml file into your project folder:

docker-compose.yaml
version: "3.9"

services:
mongodb:
image: mongo
restart: unless-stopped
ports:
- "27017:27017"
volumes:
- mongo-data:/data/db

nodejs:
image: node:22-slim
working_dir: /app
volumes:
- ./:/app
command: ["npx", "tsx", "index.ts"]
depends_on:
- mongodb

volumes:
mongo-data:

Run with:

docker compose up

Modify your source codes and then relaunch the node container :

docker compose down nodejs
docker compose up nodejs

Test without docker-compose

Local mongodb

Install MongoDB locally following the official guide for your OS.

External MongoDB

Set the environment variable ORBITS_DB__MONGO__URL to point to your MongoDB cluster URI before running the app:

export ORBITS_DB__MONGO__URL="mongodb+srv://...."
npx tsx index.ts