The prev CLI automatically detects your project type and configures the build accordingly.
Auto-Detection
When you run prev create ., the CLI scans your project directory for known configuration files to determine the type:
| Project Type | Detected By | Default Port |
|---|---|---|
| Node.js | %%INLINECODE_1%% | 80 |
| Next.js | %%INLINECODE_2%% (with next dependency) | 3000 |
| Vite | %%INLINECODE_3%% (with vite dependency) | 80 |
| Python | %%INLINECODE_4%% or %%INLINECODE_5%% | 8000 |
| Go | %%INLINECODE_6%% | 8080 |
| PHP | %%INLINECODE_7%% | 80 |
| Ruby | %%INLINECODE_8%% | 3000 |
| Rust | %%INLINECODE_9%% | 8080 |
| .NET | %%INLINECODE_10%% | 8080 |
| Static | No config file found | 80 |
Overriding Detection
You can manually specify the project type and port:
prev create . --type node --port 3000
Available Type Values
node— Node.js application (served via nginx)nextjs— Next.js applicationvite— Vite application (served via nginx)python— Python application (FastAPI, Flask, Django)go— Go applicationphp— PHP applicationruby— Ruby applicationrust— Rust applicationdotnet— .NET applicationstatic— Static website (served with nginx)
Custom Startup Commands
If your project requires a specific startup command, use the --exec flag:
prev create . --exec "node server.js"prev create . --exec "python app.py"prev create . --exec "go run main.go"
Static Sites
If no configuration file is detected, the project is treated as a static site and served with nginx on port 80. This works great for:
- HTML/CSS/JS websites
- Built frontend applications (after running
npm run build) - Documentation sites
- Landing pages
Docker Images
If you already have a Docker image, skip auto-detection entirely:
prev create --image myapp:latest --port 8080This works with any public Docker image or images from registries you have access to.