Quick Start
Get up and running with #divisions in under 5 minutes. This guide covers installation, configuration, and your first deployment.
Prerequisites
Before you begin, ensure your environment meets the following requirements:
- Node.js 18.0 or later
- npm 9+ or pnpm 8+
- A valid #divisions API key (generate one here)
- Basic familiarity with terminal commands
nvm to manage Node versions easily across different projects. Ensure your default version is set to 18+.
1. Install the CLI
The #divisions CLI is the primary tool for managing projects, deployments, and monitoring. Install it globally using npm:
Verify the installation by checking the version:
# Output: 2.4.1
2. Initialize a Project
Create a new project directory and scaffold the default structure. The CLI will prompt you for project metadata:
divisions init
This generates:
divisions.yaml- Core configuration.env.example- Environment templatesrc/- Application entry pointpackage.json- Dependencies & scripts
3. Configure Environment
Copy the example environment file and add your API key. This step connects your local environment to the #divisions platform:
echo "DIVISIONS_API_KEY=your_key_here" >> .env
Edit divisions.yaml to set your runtime preferences:
name: "my-app"
region: "us-east-1"
runtime: "nodejs18.x"
deploy:
env: "production"
auto_scale: true
min_instances: 2
.env file to version control. It is already included in .gitignore by default.
4. Deploy & Verify
Run the deploy command. The CLI will bundle your assets, upload them to the edge network, and provision your environment:
# Output:
✓ Building assets...
✓ Uploading to edge nodes...
✓ Provisioning runtime...
✓ Live at: https://my-app.divisions.app
Monitor real-time logs directly from your terminal:
Troubleshooting
Common Issues
- Authentication Failed: Verify your API key has the
deploy:writepermission scope. - Build Timeout: Increase
build_timeoutindivisions.yamlif your project uses heavy dependencies. - Port Conflicts: The dev server uses port 3000 by default. Override with
--port 3001.
For advanced debugging, enable verbose logging:
Next Steps
Your application is now live. Explore these resources to scale your workflow: