Pages

The FProxy server allows you to load modification content from your local file system instead of the Frosmo back end, and to hot-reload only the content of the changed modification rather than the entire page in your browser. Using the server involves starting the server application in your terminal and enabling the server for your site in the Frosmo Debugger.

Before you can use the FProxy server, you need to install FProxy and initialize a sites directory for your site.

If you don't want to test the content in your browser during development, you don't need to start the server.

You must start the server before you begin development. You can stop the server after you're done with development. You can also check the server status at any time.

Starting the FProxy server

To start the FProxy server:

  1. In your terminal, run the following command:

    fproxy server start

    The command starts the server as a foreground task, so the command blocks the terminal session and does not return you to the prompt. Pressing Ctrl+C / Cmd+C stops the server, but it is recommended that you gracefully stop the server instead. If you want to continue using the terminal, open a new terminal session. Alternatively, you can start the server as a background task by adding & at the end of the command, in which case the command returns you to the prompt after it completes:

    fproxy server start &

    However, all server status messages now print to the prompt.

    You can run the start command from any directory. However, if you run it from a directory that has not been initialized as a sites directory, FProxy displays a note about initializing the current directory. You can ignore this note.

  2. Copy the URL and port number of the server. The port number is the same one you defined when you first initialized a sites directory.

    URL and port number of the FProxy server

  3. Open your browser, go to your site, and open the Frosmo Debugger by selecting its bookmarklet.
  4. In the Frosmo Debugger, select FProxy.
  5. Enter the URL and port number for the server, and click Save.

    Enabling the FProxy server in the Frosmo Debugger

    If you've already enabled and disabled the server once during your current browser session, you don't need to re-enter the URL and port number. To re-enable the server, click Enable.

    Re-enabling the FProxy server in the Frosmo Debugger

  6. If you want to use hot reloading on the site, select Hot reloading.
  7. Reload the page.

    Reloading the page closes the Frosmo Debugger. To reopen it, select its bookmarklet again.

You have started the FProxy server. Any changes you now make locally to downloaded modification content are reflected on the site in your browser.

Stopping the FProxy server

To stop the FProxy server:

  1. In your browser, go to your site, and open the Frosmo Debugger by clicking its bookmarklet.
  2. In the Frosmo Debugger, select FProxy.
  3. Click Disable.

    Disabling the FProxy server in the Frosmo Debugger

  4. In your terminal, run the following command:

    fproxy server stop

    You can run the stop command from any directory. However, if you run it from a directory that has not been initialized as a sites directory, FProxy displays a note about initializing the current directory. You can ignore this note.

You have stopped the FProxy server. Changes you now make locally to downloaded modification content are no longer reflected on the site in your browser.

Checking the FProxy server status

To check whether the FProxy server is running or stopped, in your terminal, run the following command:

fproxy server status
  • No labels