Giter VIP home page Giter VIP logo

Comments (5)

MRdNk avatar MRdNk commented on June 6, 2024

RTFC.
Sorry my bad, should have checked out the code first, if anyone else is looking for the same thing, check out ...
https://github.com/coreybutler/node-windows/blob/master/lib/winsw.js#L51-L56

Would be cool if this was documented, might add a PR for documenting this, when I've had a proper play with it.

from node-windows.

coreybutler avatar coreybutler commented on June 6, 2024

Ah, you found it while I was typing! Feel free to do a doc PR. I am actually getting ready to release a round of updates that have been on my backburner for a while, but that is not one on my list... but I'm happy to accept contributions. I'm not 100% convinced the solution will provide exactly what you're looking for, but it might at least give you a start.

To address your point regarding scope, it is not something I planned to address in great detail with node-windows (or node-mac/linux). For quite some time now, I have been working on a different project called NGN for this type of scenario. It is a distributed programming framework that has a server agent capable of registering and communicating with disparate processes (LAN & WAN). In some ways, it is similar to Seaport. The node-* modules are really just "housing" for NGN processes though. The project is done, but I have some folks vetting out bugs at the moment... so not ready to release just yet.

from node-windows.

MRdNk avatar MRdNk commented on June 6, 2024

OK, cool - well I'll see where I get with it.

NGN sounds interesting, I'll have to watch out for that.

from node-windows.

coreybutler avatar coreybutler commented on June 6, 2024

So it's been a while and a lot has changed (coming in the next major release). winsw has added support for dependencies, though I'm not sure they fit in the scope of the node-* modules. Regardless, it should be pretty easy to make this happen.

Additionally, the events, such as start will now trigger in an order where you could create a script with event handlers to launch processes in a specific order, i.e. something along the lines of:

serviceA.on('start',function(){
  serviceB.start();
});

serviceB.on('start',function(){
  serviceC.start();
});

serviceC.on('start',function(){
  console.log('All 3 scripts starting.');
});

serviceA.start();

from node-windows.

MRdNk avatar MRdNk commented on June 6, 2024

Sounds good, look forward to seeing it.

from node-windows.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.