plentico / plenti

Static Site Generator with Go backend and Svelte frontend
https://plenti.co
Apache License 2.0
1k stars 48 forks source link

Enhacement: Check Port Availability #285

Closed gabinpoa closed 1 year ago

gabinpoa commented 1 year ago

Hello there! I'm submiting this pull request to address the issue #275 . The current behavior leads to a complete build process even if the specified port is already in use, resulting in an error message afterward. Now, before starting the build process for serving the site, it checks if the specified port is available. If the port is already occupied, it immediately displays an error message, guiding users to either override the port using the -p flag or update the port in the Plenti configuration file. I've tested these changes to ensure they work okay. Any feedback is greatly appreciated. Thank you for your time and consideration! 😊

Fixes #275

jimafisk commented 1 year ago

Lovely, thanks so much for the contribution @gabinpoa! It looks great!