UNPKG

locadot

Version:

Secure your local development environment with HTTPS and custom domains like dev.localhost.

139 lines (85 loc) β€’ 2.59 kB
# locadot πŸ” ## ✨ Features - βœ… Automatically generates trusted local SSL certificates - πŸ” Reverse proxies `localhost:PORT ` β†’ `https://your.custom.domain.localhost` - πŸ–₯️ Works on Windows, macOS, and Linux - πŸ› οΈ OS-specific guidance for host setup - ⚠️ Warns and exits if domain isn’t correctly mapped to a local IP - ❌ Only supports proxying to localhost ports – external IPs are not allowed for security --- ## πŸš€ Usage ```bash npx locadot add --host dev.localhost --port 3350 ``` --- ## πŸ“¦ Commands ##### ▢️ Default (Run Proxy) ###### Starts a reverse proxy to the specified localhost port. ```bash npx locadot add --host <custom.localhost> --port <localhost-port> ``` ##### 🧾 Update existing host ###### Update domains currently registered with locadot. ```bash npx locadot update --host <your.localhost> --port <localhost-port> ``` ##### 🧾 Remove existing host ###### Remove domains currently registered with locadot. ```bash npx locadot remove --host <your.localhost> ``` ##### 🧾 View Registered Hosts ###### Displays all domains currently registered with locadot. ```bash npx locadot host ``` ##### πŸ“Ί Watch Logs ###### Continuously watches and outputs proxy logs in real time. ```bash npx locadot watch:logs ``` ##### 🧹 Clear Logs ###### Clears all saved logs. ```bash npx locadot clear:logs ``` ##### 🧹 Clear Hosts ###### Clears all existing hosts. ```bash npx locadot clear:hosts ``` ##### 🧹 Show Config Path ###### Print the path of config files used. ```bash npx locadot path ``` ##### 🧹 Show Logs Path ###### Print the path of logged files used. ```bash npx locadot path:logs ``` ##### 🧹 Show Hosts Path ###### Print the path of hosts files used. ```bash npx locadot path:hosts ``` ##### πŸ”„ Restart Proxy ###### Restarts the proxy server and reloads configuration. ```bash npx locadot restart ``` ##### πŸ›‘ Stop All ###### Stops all running locadot hosts and shuts down the proxy server. ```bash npx locadot stop ``` ##### πŸ›‘ Kill ###### Stops all running locadot hosts, clear logs and host mapping and shuts down the proxy server. ```bash npx locadot kill ``` --- ### πŸ™Œ Contributing: Pull requests are welcome! Feel free to open issues for bugs or feature requests. Contributions help improve locadot for everyone, so don't hesitate to get involved. --- ##### Made with ❀️ to make secure local development simple.