I have some questions that have come up during my install of EWD.js. I give some background on the steps to get to the issue. I'll put the actual questions / concerns in bold.
The first part of this tutorial is to set up a machine on Amazon. I have an existing machine, so I skipped past that part.
I went on to page 65 and downloaded the .deb installer for 32-bit Ubuntu.
I followed steps 2 and 3.
For step 4, instead of installing the .deb file from the console, I double-clicked it from a graphic desktop. This launched a GUI installer that appeared to install without any problems.
Step 5 states
One last step: Log out and log back in as ubuntu: this will ensure that you have the correct read/write/execute permissions to access your EWD.js Home Directory and to develop EWD.js applications.
This confuses me. I don't have a user "ubuntu" on my system. I assume this might have been set up in the instructions for the Amazon machine. Everything else on my system is typically run under my user kdtop. I did verify that the expected files were found in the /opt/globalsdb and the /opt/ewdlight directories. I changed all the files in them to be owned by user kdtop, but kept them in the group ewd. I'm not sure if this will cause problems later or not. Does EWD.js have requirements for a particular user:group?
For the next step
sudo start ewdlite
It seems that when I first tried this, it failed. I did some research and started writing this message. I then tried it again, and it worked. Great!
I followed the instructions to change the from HTTP to HTTPS, but when I did, I could no longer bring up the EWD monitor page in the web browser. The browser just kept waiting for a response from the server. I suspect this is because I don't have a certificate installed. I changed it back and will work on this later. Am I correct that this is the reason?
So now that am done with Appendix 1, I go back to page 6, where it discusses ewdgateway2. I assume that this has already been installed, but to follow along, I want to know what my EWD.js home directory is. Page 7 discusses installing it inside ~/globalsdb. Mike's installer set up a directory /opt/globalsdb. So is this the home? When I get a directory listing there, it doesn't have a folder named "ewdgateway2". It has only folders bin, dev, and mgr. [CORRECTION: I found on page 66 that the EWD.js home directory is "/opt/ewdlite"]
So I just did a full file system search for "ewd*" and I found, that apparently a former version of EWD was already on my system, I presume from this being an Astronaut VistA installation. The old installation files are in /opt/lsb-mgateway/wed, and /opt/worldvista/EHR/web/ewdapps, and /opt/var/VistA/www/resources/ewd* and /opt/var/VistA/www/ewd/ and /opt/var/VistA/www/r/* . My new installation files appear to be in /opt/ewdlite/* and /opt/globalsdb. How can I check that the old system is not starting up as a service? I don't care if the folders sit there unused, but I don't want both systems running and conflicting.
But back to looking for the ewdgateway2, it appears to be /opt/ewdlite/node_modules/ewdgateway2/. And I just found the EWD.js directory (noted above).
Looking on page 9, there is a list of files that should be in the EWD.js home directory. I have ewdStart-globals* files, but ewdStart-gtm.js is missing. I assume that Mike's installer took care of this. CORRECTION: when I inspect /opt/ewdlite/ewdStart-globals.js, I see that it is not pointing to GTM, but is instead pointing to a cache' database in /globalsdb. So I will need to manually edit this file to match the GT.M setup shown on page 11, modified to my paths. I think the documentation needs to be more clear that Mike's installer doesn't easily allow for connection for GT.M database, since ewdStart-gtm.js is missing. I'll have to type this in by hand from the display on page 11. I'm a bit grumpy now.
So to edit my /opt/ewdlite/ewdStart-globals.js, I see that for the example below:
nodePath: "/home/vista/mumps" [ ‘requires’ path for loading NodeM’s
I need to get the path to mumps.node. But I don't know if this was installed in Mike's installer or not. I suspect not, since it left me using globalsdb. So I see on page #4 that I can download this from David Wicksell's site. Going there, I see that it is version 0.3.1, with a disclaimer "Nodem is experimental, and not yet ready for production"... not very encouraging. I first want to see if this has already been installed. I do a full system search for "mumps.node" and "nodem" and no hits for either.
I see that my system has npm, so I did "npm install nodem". It appeared to succeed. I can't tell where the files went, so another full system search for nodem now reveals 2 hits:
/home/kdt0p/.npm/nodem
/opt/ewdlite/node_modules/nodem
I don't understand the sentence [‘requires’ path for loading NodeM’s mumps.node file ]. I would have expected it to say "required path..." Why is "requires" in quotation marks? I do a search of my system, and now I find the following
$ find / -name 'mumps.node' 2>/dev/null
/home/kdt0p/.npm/nodem/0.3.1/package/lib/mumps.node
/opt/ewdlite/node_modules/nodem/lib/mumps.node
I'm a bit confused by that 2nd entry. Surely the npm installer didn't put it there. Did I miss that it was already there before??
According to Wiksell's instructions I copy the correct version
cp mumps10.node_i686 mumps.node
.... I'm out of time. I'll post this, and then continue on tomorrow.
Kevin T