r/node • • Jun 19 '18

Possible to create a MacOS .pkg for Node application?

I've got a script for a simple dynamic rss-feed generator and got to wondering if it would be possible to create a package installer for MacOS for it?

Right now I've got a launch.command file that's on login items which invokes 'forever start <script.js>' and the script has a few dependencies such as Handlebars views, settings files, images and the like.

Any way to install that (ideally installing node.js and forever globally if they're not present on the system) and add it to the LaunchDaemons rather than having to use a launch command?

It's more a learning experience than necessity, but the closest answer I could find was from 2013.

2 Upvotes

2 comments sorted by

4

u/DROWE859 Jun 19 '18

Check out zeit/pkg I use it to bundle a desktop webserver for Windows and Mac.

I’m also using forever-monitor in my bundle. It’s not quite a .pkg but it should be a launchable app for ya.

1

u/OzziePeck Jun 20 '18

Beat me to it!