As soon as every week I’ve to cope with a zombie course of or attempt to begin a course of that is already working on its designated port. Usually I exploit macOS’s Exercise Monitor to kill the method, which is time-consuming. What if we might simply kill a course of on a given port from command line? Properly, we are able to!
To terminate a course of on a given port, set up kill-port
and beginning nuking these zombies by way of:
# yarn international add kill-port # Kill processes on a number of ports kill-port 6060 8000
If you wish to programmatically kill a port that you simply wish to guarantee your app will run on, you are able to do that as properly:
const kill = require('kill-port') kill(6060, 'tcp') .then(console.log) .catch(console.log)
I look ahead to incorporating this library into my Node.js websites in order that I can clear the best way for a given port and keep away from zombie processes.
Introducing MooTools Templated
One main downside with creating UI parts with the MooTools JavaScript framework is that there is not an effective way of permitting customization of template and ease of node creation. As of right this moment, there are two methods of making: new Aspect Insanity The primary method to create UI-driven…
Fb Open Graph META Tags
It is no secret that Fb has change into a serious site visitors driver for all sorts of internet sites. These days even giant firms steer shoppers towards their Fb pages as a substitute of the company web sites instantly. And naturally there are Fb “Like” and “Suggest” widgets on each web site. One…
Create a CSS Dice
CSS cubes actually showcase what CSS has change into through the years, evolving from easy shade and dimension directives to a language able to creating deep, inventive visuals. Add animation and you have one thing actually neat. Sadly every CSS dice tutorial I’ve learn is a bit…
Instagram For MooTools
When you’re nonetheless rocking an iPhone and fancy taking a photograph every so often, you would be loopy to not be utilizing an app referred to as Instagram. With Instagram you’re taking the images simply as you’d together with your native iPhone digicam app, however Instagram…
Source link