Web-app Hosting with CompleteFTP

Web-apps can be hosted by CompleteFTP using Javascript Server-Side (JSS). Once enabled (see below) for a web-site and a user, any file that has the extension, .jss, is assumed to contain JSS code, that will be executed when accessed via HTTP or HTTPS.

While JSS supports traditional web-app where HTML is mostly generated on the server, it excels particularly at Single-Page Applications (SPA's) as it uses a method of client-server communications (AJAX) that makes it trivial to invoke a server-side Javascript function from a browser-based script. This will be described in the JSS Web-App Basics section.

Enabling JSS for web-apps

A file with a .jss extension will be run as JSS if:

  1. JSS is enabled on the site serving up the page, AND
  2. JSS is enabled for the either:
    1. the logged in user, OR
    2. user who owns the folder that contains the file

If these conditions are not satisfied then the file will be served up the same as an non-JSS file.

JSS is enabled for a site by checking the JSS enabled checkbox in the Site Settings category, HTTP/HTTPS -> Server-side Javascript (JSS): JSS enabled - Site

JSS is enabled for a user by checking the JSS (Server-side Javascript) checkbox in the Site Properties category, Scripting and Shells: Jss enabled - User

Note that for JSS web-apps to be available to unauthenticated users, JSS must be enabled for the owner of the /Public folder, i.e. anonymous, which it isn't by default.

For more information on how to host a web-app in CompleteFTP, please refer to Step-by-step guide: Host a web-app in CompleteFTP .