Node-pre-gyp makes it easy to publish and install nodejs c addons from binaries
This is best automated. It provides the ability to store and publish your binaries within your repositories GitHub Releases if you would rather not use S3 directly. Instead we recommend bundling. S3 Hosting You can host wherever you choose but S3 is cheap, node-pre-gyp publish expects it, and S3 can be integrated well with Travis. For a full example see node-addon-example's index.
If a a binary was not available for a given platform and --fallback-to-build was used then node-gyp rebuild will be called to try to source compile the module. The larger app also depends on other modules installed with node-pre-gyp You only want to trigger a source compile for myapp and the other modules. The binary entry in package. This is accomplished by imposing additional path and file naming requirements.
Just put node-pre-gyp package publish in your. It is recommended to create a IAM user with a policy that only gives permissions to the specific bucket you plan to publish to. The advantage of using S3 buckets is that node-pre-gyp can handle the deployment publishing process for you, entirely. For an example of doing this see node-add-example's. S3 is a very solid hosting platform for distributing large files.
You only want to run the publish on the push commit. The --build-from-source tells node-pre-gyp to not look for a remote package and instead dispatch to node-gyp to build. It provides the ability to store and publish your binaries within your repositories GitHub Releases if you would rather not use S3 directly. The name of the binary build output - both locally and remote.
You manually publish the binary created by the package command to an https endpoint Ensure that the host value points to your custom https endpoint. A url to the remote location where you've published tarball binaries must be https not http. Executing the project will result in the realization that the Node. This is derived from the Node. Pass the target platform and override the host platform.
We're just talking about the binary module here and not your entire npm package. Remember this publishing is not the same as npm publish. The larger app also depends on other modules installed with node-pre-gyp You only want to trigger a source compile for myapp and the other modules.