Hosting a Web Application During Development

Host WebVIs running in the G Web Development Software editor with NI Web Server or the G Web Development Software embedded web server.

NI recommends hosting your WebVI with NI Web Server. NI Web Server helps you avoid additional configurations when you use other APIs NI Web Server hosts, such as SystemLink Tags and Messages. Refer to the NI Web Server Manual for more information.

Use the G Web Development Software embedded web server if you are unable to configure NI Web Server on your development PC. If you choose the embedded web server, you cannot connect to APIs hosted on the NI Web Server, such as the SystemLink APIs, unless you configure NI Web Server to support the cross-origin resource sharing (CORS) mechanism. Refer to Choosing Remote Settings to learn more about enabling CORS for NI Web Server.

Note The G Web Development Software embedded web server has an origin of http://localhost:<port>. Your operating system assigns the port based on availability and varies between instances of the editor. Any HTTP request made by a WebVI hosted in the editor that does not target a user resource is considered a cross-origin request.

To set your hosting preference in G Web Development Software, select File » Preferences » Web Server.