Is there a way to have an Express app packaged with pkg reference local files not included in the pkg assets?



I made a little create-react-app app as a utility for a friend. I want to serve it with express, and package it all up with pkg so that he doesn’t have to install Node or anything and can just double-click an executable and open a browser to use it.

So far I have it working except for the images. The problem is that there are over 2.7 GB of images, so I don’t want to package all that up by specifying them as assets for pkg.

How can I get the packaged app to see the local filesystem so the images can stay out of the executable package?


And the answer is… use nexe instead.

Don’t know what’s going on under the hood between them, but I was able to package what I wanted (the node server) as an executable, and exclude all the images, and have the site run locally as expected when the express server was started up by running the executable.

Answered By – Dylan Cristy

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More