You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, we have our projects hosted on Azure. We are planning to build some nodejs utilities of hybrid nature: node-js with C++ add-ons and .NET using edge.
Is it possible to use Azure Storage for Node.js as a storage to host binaries build by node-pre-gyp? If not, please provide the steps if someone has successfully configured it.
It would be much appreciated if Azure Store is added as an alternative service provider to AWS, and the how-to info is reflected on docs.
Yes, this should be doable now without any changes to node-pre-gyp. The install command that is used when users install your binaries uses https and does not depend on AWS S3. That is the only critical piece. So just configure the host parameter to point to an http/web accessable location hosted on azure and your users will be able to get your binaries.
As far as getting the binaries published. Well, it should be as simple as running node-pre-gyp package locally and then manually pushing the tarball to your remote location. But with a little bit of effort you can automate that yourself because it is easy to programmatically interact with node-pre-gyp in order to write your own publish script. You can run node-pre-gyp reveal to get access to all the info you'd need to script uploading your binaries to a custom location on azure. A workflow could look like this:
# build and package binary module
./node_modules/.bin/node-pre-gyp build package
# then validate the package
./node_modules/.bin/node-pre-gyp testpackage
# next grab the path to the tarball package
LOCAL_BINARY=$(./node_modules/.bin/node-pre-gyp reveal staged_tarball --silent)
REMOTE_BINARY=$(./node_modules/.bin/node-pre-gyp reveal hosted_tarball --silent)# ... then use whatever azure upload tool you want to move the LOCAL_BINARY to the REMOTE_BINARY
Let me know if I need to make anything more clear.
@jasonwilliams200OK - yes, I highly recommend using Amazon S3 - you are likely talking about less than a few bucks a month to host a node-pre-gyp binary on S3.
Activity
springmeyer commentedon Jan 9, 2015
Yes, this should be doable now without any changes to node-pre-gyp. The
installcommand that is used when users install your binaries useshttpsand does not depend on AWS S3. That is the only critical piece. So just configure the host parameter to point to an http/web accessable location hosted on azure and your users will be able to get your binaries.As far as getting the binaries published. Well, it should be as simple as running
node-pre-gyp packagelocally and then manually pushing the tarball to your remote location. But with a little bit of effort you can automate that yourself because it is easy to programmatically interact with node-pre-gyp in order to write your own publish script. You can runnode-pre-gyp revealto get access to all the info you'd need to script uploading your binaries to a custom location on azure. A workflow could look like this:Let me know if I need to make anything more clear.
springmeyer commentedon Jan 21, 2015
@jasonwilliams200OK - yes, I highly recommend using Amazon S3 - you are likely talking about less than a few bucks a month to host a node-pre-gyp binary on S3.