Server Commands
S-PHP provides CLI commands to manage your development environment and run background services.Start Development Server
Theup command starts PHP’s built-in web server for local development:
How It Works
This command (Command.php:17) executes:Server Details
- Host: localhost
- Port: 8000
- Document Root:
public/directory - Access URL: http://localhost:8000
Output
When you run the command, you’ll see:Usage Notes
- The server runs in the foreground and displays real-time request logs
- Press
Ctrl+Cto stop the server - The server automatically serves files from the
public/directory - Index files (
index.php) are automatically served for directory requests
Example Session
Run Job Worker
Thework command starts the background job worker:
How It Works
This command (Command.php:18) executes:Use Cases
- Processing queued emails
- Running scheduled tasks
- Handling long-running background operations
- Processing asynchronous jobs
Running in Production
For production environments, consider using a process manager like:- systemd (Linux)
- Supervisor (cross-platform)
- PM2 (if running alongside Node.js)