-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use node-horseman in azure function? #295
Comments
I have never worked with Azure. Did you make sure PhantomJS is installed on there? |
Yes, on Azure Portal via Kudu Cmd, I have installed the PhantomJS as well as Node Horseman and the node modules folder is also created on portal containing the packages. I wrote this sample code in Azure Function after installing all the required dependencies:
I noticed that it does get executed without any error; but Pdf file wasn't generated. I placed success, info and error logs in between. I also added various event listeners mentioned in this part of Node-Horseman documentation. But neither logs printed anything. I then commented the code, and wrote simple file creation code from azure function which didn't work either. On further researching, I asked on Stack Overflow, whether is it possible to Create and Write any file from Azure Function (Azure function supports Blob and File triggers) and store in File (or Blob) storage directly; to which I got the following reply and comment:
This led me to conclusion that, we can do file operations from azure function on already existing file (via uploading, or any other similar method) but the creation of File is not possible as of date of writing. However, the feature is being tracked on their github page. Therefore, there is potentially not an issue with Node-Horseman code except that an exception or error should have been thrown on |
I am trying to run node-horseman in httptriggered azure function. I installed node-horseman using npm in azure function directory as well. However various service calls like, Log(), on(), open() etc does not seem to work.
So it will be great if a demo regarding the same is added, or shared for better understanding. Thanks.
The text was updated successfully, but these errors were encountered: