Иногда бывает ситуация когда 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
˖ ࣪⭑ Dingg.. Dongg.. 🛎
Check it out students, the bell has rung. It’s such an honour to present our new #Whiteboard. Dont forget to read our school rules before using it hoho. Have a wondrous day ahead! ♡⸝⸝
˖ ࣪⭑ Dingg.. Dongg.. 🛎
Check it out students, the bell has rung. It’s such an honour to present our new #Whiteboard. Dont forget to read our school rules before using it hoho. Have a wondrous day ahead! ♡⸝⸝
˖ ࣪⭑ Dingg.. Dongg.. 🛎
Check it out students, the bell has rung. It’s such an honour to present our new #Whiteboard. Dont forget to read our school rules before using it hoho. Have a wondrous day ahead! ♡⸝⸝
˖ ࣪⭑ Dingg.. Dongg.. 🛎
Check it out students, the bell has rung. It’s such an honour to present our new #Whiteboard. Dont forget to read our school rules before using it hoho. Have a wondrous day ahead! ♡⸝⸝
#typescript#collaboration#drawing#flowchart#localfirst#mindmap#productivity#whiteboard
Drawnix is a free, open-source online whiteboard tool that combines mind maps, flowcharts, and free drawing in one platform. It supports features like image insertion, undo/redo, infinite canvas zooming, and exporting to PNG or JSON. It works on mobile devices and supports markdown and mermaid syntax for easy diagram creation. Built on a plugin architecture, it allows flexible development and integration with different UI frameworks. Using Drawnix helps you organize ideas visually, collaborate smoothly, and save your work automatically, making creative work and teamwork easier and more efficient.
https://github.com/plait-board/drawnix