Install the Apex CLI and deploy your first project to edge locations in under two minutes. After setup,apex deploythe command scans your code repository and automatically selects the correct runtime.
Step
Komut
Description
1. Setup
npm install -g apex-cli
Installs the CLI globally
2. Login
apex login
Authenticates in the browser with your account
3. Start
apex init
Creates an apex.config.json file
4. Deploy
apex deploy --prod
Publishes the project to production edge locations
Core concepts
Apex is built on three core primitives: functions (the code that responds to requests), edge locations (geographic locations where functions run) and environments (separating production, preview, and development). A separate preview environment is automatically created for every branch push.
Functions
Write in TypeScript, JavaScript, or WebAssembly; every request runs at the nearest edge location.
When you connect a repository, Apex deploys every push to the main branch to production and other branches to their own preview URLs. Build stepsapex.config.jsonare defined within the project and deployment history can be reviewed from the dashboard.
To roll back a versionapex rollback <deployment-id>command; traffic is routed to the previous version within seconds.
Environment variables
Define secret keys and configuration values from the dashboard orapex env addcommand. Variables can be assigned separately to production, preview, and development environments and read at runtime through theenvnesnesi through okunur.
Field domains and certificates
When you connect a custom domain, an SSL certificate is provided and renewed automatically. After updating the DNS record with your provider, verification usually completes within a few minutes.