4

I have a nodejs script that I want to package and allow for easy installation for non technical users. It's just a script that runs in the background, so electron seems overkill.

I was thinking of making it a launch daemon but not sure how to go about that.

I found this: https://coolaj86.com/articles/how-to-create-an-osx-pkg-installer.html But those instructions don't seem to apply anymore.

Any idea how you could do this now on Sierra?

Thanks!

Jonovono
  • 1,979
  • 7
  • 30
  • 53
  • I'm pretty sure you will never be seeing node on a noch technical persons computer. Also your script won't run in Background because you installed it. In fact the user would need to tell the computer to run it after installation. There are possibilities like enclose to produce a binary. – Julian F. Weinert Mar 02 '17 at 11:35
  • Ya, that's why I was thinking of making a binary containing node in it. Something like https://github.com/nexe/nexe. – Jonovono Mar 02 '17 at 22:02
  • Or compose. I'm not sure, if that also bundles node, I just used it once without any further interest – Julian F. Weinert Mar 03 '17 at 01:35

1 Answers1

2

This node module was just announced a couple of days ago, and seems to be what you're looking for:

https://github.com/zeit/pkg

Since it's so new, I haven't had any luck finding tutorials, docs or demos, but they're bound to start appearing in the coming weeks or months.

Bungle
  • 19,392
  • 24
  • 79
  • 106