Prerequisites
- Node.js 16 or higher
- PostgreSQL 12+ (for FOSS) or Hyrex Cloud account
1. Install Hyrex
2. Initialize a New Project
Use the interactivehyrex init
command to set up a new project:
- Choosing a project name
- Selecting deployment mode (Cloud or PostgreSQL)
- Configuring environment variables
- Creating project files
3. Project Structure
After runninghyrex init
, you’ll have:
app.ts
:
hyrex-app.ts
:
4. Send Tasks
Queue tasks for execution:5. Run Workers
Start workers to process tasks:6. Monitor Tasks
Visit your dashboard at hyrex.io/cloud to monitor tasks in real-time.
Complete Example
NPM Scripts
The generatedpackage.json
includes helpful scripts: