The server runs on http://localhost:3000 by default. Users set the PORT environment variable to change the port.
Production Deploy
Production deployment involves cloning the repository, installing dependencies, verifying the setup, and configuring a reverse proxy for HTTPS.
Steps
- Clone the repository to the server.
- Run
bun install. - Verify the CLI installation by checking the version:
depends --version
- Start the server with
PORT=3000 bun run src/server.ts. - Configure a reverse proxy (e.g., Nginx or Caddy) in front of the server for HTTPS.
Reverse Proxy Examples
Nginx
An example Nginx configuration redirects HTTP to HTTPS and proxies requests to the depends.cc server.
server {
listen 80;
server_name depends.cc www.depends.cc;
return 301 https://depends.cc$request_uri;
}
server {
listen 443 ssl;
server_name depends.cc www.depends.cc;
ssl_certificate /etc/letsencrypt/live/depends.cc/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/depends.cc/privkey.pem;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Recent changes
- Merged: installation.md → deployment.md
- Created: Added deployment instructions for server setup