node-linux
node-linux copied to clipboard
systemd support
Add support for systemd style services.
Do check out the systemd module if you're looking into this. I already solved some of the problems there. Let's join forces to make both modules great (rather than duplicate work).
I looked at the systemd module before but really didn't have time to look at it enough to make any kind of educated decision about using it. I wouldn't mind leveraging it in node-linux so long as the resulting node-windows/mac/linux APIs remain consistent. That is a key requirement for me, since these 3 modules are used interchangeably in a larger platform called NGN to deploy scripts as processes.
If you're talking about this package, it looks like it's meant for integrating the sockets of a node app with systemd, rather than starting a node app with systemd, which is the target for node-linux, and at least in that page it's done manually.
Either way, I've started writing a systemd module for node-linux for installation/uninstallation/enabling/disabling/starting/stopping of services
Any development on this one? @RazZziel want to join forces for implementing this enhancement? Doesn't look like a lot of work to do.
@RazZziel @MayaLekova - My time has been pretty consumed recently, so I want to express my thanks in advance for the efforts you've started on.
My goal with this project was to be part of the great trilogy, i.e. a common API for Windows/Mac/Linux so the general node developer doesn't have to think about how to launch a daemon, regardless of the OS. I started work on a new general version and got held up with other things. I'd be happy to have a discussion (Gitter, Hipchat, etc) around systemd efforts and some of the plans I had revolving around the other operating systems. I really don't think systemd efforts would be altered by this, but I have toyed with the idea of utilizing a Go wrapper (which stems more from Window's use of winsw). The bigger point in all of this is I'm happy to discuss... this project (and the others) has been stagnant for longer than I'd hoped and collaboration could definitely change that.
Hi! Actually I have around 50% of the systemd integration implemented, but still haven't found the time to test it, organize the changes and push them to my fork. I'll try to do it within this week, and afterwards we can comment.
Thank you for answering! It's always good to have someone else around when the time goes short, and imho the idea for common API for services on all 3 platforms is worth the work :) I'd be happy to discuss some ideas. I'll most probably be writing systemd+upstart module this week (although still haven't decide what the API will be). For the Windows module maybe a good option will be a native one - something similar to QtService, but using libuv instead of Qt's utlities. Although this already seems a large task.
Implemented and working, at least on my laptop Commited pull request: https://github.com/coreybutler/node-linux/pull/18
Is this issue solved with the merge and available in the published npm module?