Localhost explained

We have a number of users who try to review website with the video.js player and our Nuevo plugin through localhost. This is possible as our software license includes one for localhost. However first the user must realize what localhost is.

Testing local files

Many examples won't run if you open them as local files. This can be due to a variety of reasons. Same Nuevo plugin for video.js will not work if you open some example website page as local file. Simply localhost is not host name.

Local HTTP server

To get around the problem of testing video.js with Nuevo plugin you need to test such examples by running them through a local web server. Setting up a Windows PC to host a local server is pretty simple to do and you can find many articles about it, like this one.

For more demanding projects you may need to have a local host with Apache HTTP, MariaDB database and support for scripts written in the PHP or Perl programming languages. For this purpose the most popular solution is XAMPP, a completely free, easy to install software. XAMPP is available for Windows, Mac and Linux.

The player with Nuevo plugin should work fine on local web server with "localhost" host name. In other words you must see "localhost" string as part of the Url in the browser's address bar. Subdirectory or localhost port does not matter.

When building locally apps like react, vue or nextjs, localhost is default host name, only different ports. So you don't have to worry about license.

Summary

When testing software through local server, you must be aware of the limitations of such solution. Local server, usually uses HTTP protocol, while some 3rd party libraries require HTTPS. Requesting resources from other servers may trigger a CORS error in the browser.

To be sure that your website page is running properly always the best choice is to test it online. This is not a problem to create domain's subdirectory or subdomain on server, upload files and test website pages as long as you need it.

Nuevodevel Blog
Nuevodevel Tweeter