Иногда бывает ситуация когда dev-сервер по какой-либо причине не закрылся и висит в процессах, занимая порт.
Это может быть из-за падения IDE или просто сам забыл погасить и закрыл терминал.
Для таких случаев я набросал простую функцию с командой:
kill_on_port() {
port=$(lsof -t -i:$1)
echo "KILL PROCESS:" $port
sudo kill -9 $port
}
alias killonport="kill_on_port $@"
Код поместить в ~/.bashrc и рестартнуть систему.
Если во время старта dev-сервера получаете ошибку что порт уже занят, просто выполните команду, подставив свой порт.
Bash
kill_on_port 8000
Скорее всего бесполезно, если другой процесс назначен на перезапуск вашего dev-сервера в случае падения.
Имя команды можете изменить на любое другое.
#linux
🔥News from Freename!🔆
Web3 domain registrar Freename has added support for the new Base chain! Now you can acquire your unique domains and TLDs on BASE . Use them for your #Web3 identity, sending tokens, or creating websites compatible with traditional DNS. Enjoy new opportunities and expand your horizons with Freename!
#Freename#BaseChain#Web3#Domains#TLDs#Blockchain#web3names#Key7Channel
#html#digitalplat#domain#domain_platform#domainname#domains#free#freedomain
You can get a free domain name from DigitalPlat FreeDomain with no cost or hidden fees. You just register a unique domain under extensions like .US.KG or .DPDNS.ORG and use any DNS provider you like, such as Cloudflare, to host your website. This helps you create your own online space without paying for a domain, making it easier and cheaper to start a website or project. Over 350,000 people already use it, and it’s supported by a nonprofit, so it’s trustworthy and open to everyone regardless of budget.
https://github.com/DigitalPlatDev/FreeDomain
#javascript#cloudflare#dns#domain#domains#free#free_domain#free_domains#free_for_dev#free_for_developers#github_pages#subdomain#subdomains#website
You can get free subdomains for personal or open-source projects from Open Domains by registering through their GitHub repository. They offer several domain options with strong security features like SSL, HTTPS, and DNSSEC, ensuring your site is safe and reliable. You submit a pull request with your subdomain details, and after approval, your domain is ready to use, usually within minutes. This service is great if you want a free, easy-to-set-up web address for your project without buying a domain, saving you money and effort while maintaining good security and performance. Donations help keep the service running.
https://github.com/open-domains/register