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 TypeDetected ByDefault Port
Node.jspackage.json80
Next.jspackage.json (with next dependency)3000
Vitepackage.json (with vite dependency)80
Pythonrequirements.txt or pyproject.toml8000
Gogo.mod8080
PHPcomposer.json80
RubyGemfile3000
RustCargo.toml8080
.NET*.csproj8080
StaticNo config file found80

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 application
  • vite — Vite application (served via nginx)
  • python — Python application (FastAPI, Flask, Django)
  • go — Go application
  • php — PHP application
  • ruby — Ruby application
  • rust — Rust application
  • dotnet — .NET application
  • static — 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 8080

This works with any public Docker image or images from registries you have access to.

Don't want to share your source code? Build locally and deploy just the image — no source code ever leaves your machine:

# Build locally
docker build -t myapp:latest .

# Deploy only the image
prev create --image myapp:latest --port 3000