Иногда бывает ситуация когда 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
🤝#Electra is not just a DEX but your advantage in the market!
Electra will soon open access to a unique trading platform with the best tools for smarter, faster and more efficient trading.
⚡️The main advantages of the future platform:
✔️Artificial intelligence for predicting market trends and automating portfolios.
✔️Freedom and security: none🙅 KYC, up to 1000x leverage and multi-chain trading.
✔️Social features: real-time communication, participation in the Electra Trading League and obtaining unique Proof-of-Trade NFTs.
✔️Access to deep liquidity with CEX-level efficiency in a decentralized environment.
✔️CEX-like performance: Using the #Lumia L2 infrastructure, #Electra delivers lightning-fast trades with tight spreads.
✔️No profit limits: no open interest limits, no funding rate limits, and no arbitrary rules.
✔️Trade 24/7 on web platform, desktop or via Telegram Mini App with professional tools and analytics.
✔️Game-based learning with Bulls'n'Bears — a fun educational game in Telegram Mini App.
🤑 While we wait for the release of the DEX platform, we continue to participate in current activities:
✔️Farm points in Electra MiniApp
✔️Play Bulls'n'Bears
✔️Complete daily tasks
🚀Dive into the world of Electra
#Electra#TON#DEX#NoKYC#Web3