Repla

Repla Server: Documentation

Running Repla Server with an existing web app. These instructions assume you've already run the Repla app once.

  1. Navigate to your web app in the terminal.
  2. Pass the command you use to run your web server as the first parameter to the repla server command-line utility. For example, the default command to run a Ruby on Rails project is bin/rails server, so you'd run repla server "bin/rails server".
  3. Repla Server will try to guess the URL of the web server, and navigate to it automatically, by looking at the output of the server command. But, if the URL of the server can't be inferred by the terminal output, you might have to give the command a little bit more information using one of the command-line flags. For example, the default Express project doesn't output the URL of the local web server, so adding -p 3000 is required so Repla Server knows to navigate to localhost on port 3000.
  4. Repla Server will refresh every time a file changes on disk by default, or add -r <refresh string> to instead refresh when a specific string appears in terminal output.
  5. After your web app is running with the configuration options you want, you can hit ⌘S (or select "File" -> "Save" from the menu) to save it as a .replarun file
  6. To open your web app again later, open the .replarun file.

Examples

The examples page includes commands for running various platforms' default projects.

Command-Line Tool

Repla includes a command-line tool. It can be installed automatically from the welcome window ("Window" -> "Welcome to Repla"), or it can be installed manually:

sudo ln -s /Applications/Repla.app/Contents/Resources/Scripts/repla /usr/local/bin/repla

To uninstall the command-line tool:

sudo rm /usr/local/bin/repla

Command-Line Flags

The repla server command supports the following command-line flags. For example, to add a port number to the earlier Ruby on Rails command, use repla server "bin/rails server" -p 8080.