G Web Development Software

cancel
Showing results for 
Search instead for 
Did you mean: 

Deploying web service with an installer and NI Web Server

I'm having a hard time understanding how I'm supposed to deploy a web service to a new "pristine" machine.

I built a "Package Installer" and included the NI Web Server.  I installed it on a new machine.  From what I can tell, it installed the web server, but not my application.

I copied the files into the htdocs directory, where they seem to work, but I don't understand why I have to do this manual step.

What am I doing wrong?

 

Other questions:

* I ran the NI Web Server Configuration program on my own.  I wasn't sure I needed to, but it acted like the web server wasn't configured, so I went ahead and configured it.  Is that expected, or can this be automated by the installer?

 

* Even after copying my files to "htdocs", the configuration program says that no applications are installed.  Is this different than what I copied to htdocs?  I'm confused about what I'm supposed to see.

 

* I tried rebuilding the installer after tweaking a few things in the code, and NIPM told me the application was already installed.  I don't see my web app listed by NIPM or Add/Remove Programs, so I don't see a way to uninstall it.  Is this a bug in NIPM, or how I built the app, or is something else happening?  What's the best way to iterate on trying new installers?  I don't really want to uninstall the NI Web Server and its dependencies each time.

 

* I haven't done too much digging yet, but is there a way to configure settings in the NI Web Server so that my web app can read that configuration?  For example, I don't want to hardcode a specific IP address/port for a separate web service (running on a different machine).  That value will be fixed at the time I install everything.  I'd like to set it as part of the NI Web Server configuration, and let my app read it when it starts.

Brian Powell
Stravaro, LLC


Learn more about the DSH Pragmatic Software Development Workshops.
0 Kudos
Message 1 of 3
(1,416 Views)

In NI Package Manager, make sure you uncheck the option "Products only" when you are looking for your installed package. If that doesn't work try clicking on the gear icon in the upper right and selecting show hidden packages. It is possible that based on the package meta data it isn't showing up.

 

In addition, you may want to start with this example https://ni.github.io/webvi-examples/CallLabVIEWWebService/

 

I opened the \webvi-examples-main\CallLabVIEWWebService\WebService\WebService.lvproj web service example, added a package to the build specification, and then checked the box for the web service to include the "Web Server" web service (never even ran it). I then built the package and double clicked it to install it locally. After it installed I hit the GET route in my browser and it worked as expected.

 

Screen Shot 2021-12-10 at 5.10.43 PM.png

Screen Shot 2021-12-10 at 5.11.02 PM.png

Message 2 of 3
(1,393 Views)

Thanks for the reply, Josh.

The trick seems to be the pathname specified in the .lvdist file:

 

Screen Shot 2021-12-10 at 5.29.32 PM.png

 I did not add "\National Instruments\Shared\Web Server\htdocs\<appname>" to the destination.

 

I'm still curious about all the other questions if anybody knows the answers.

Brian Powell
Stravaro, LLC


Learn more about the DSH Pragmatic Software Development Workshops.
0 Kudos
Message 3 of 3
(1,391 Views)