Running Repla Server with an existing web app. These instructions assume you've already run the Repla app once.
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"
.-p 3000
is required so Repla Server knows to navigate to localhost on port 3000
.-r <refresh string>
to instead refresh when a specific string appears in terminal output.⌘S
(or select "File" -> "Save" from the menu) to save it as a .replarun
file.replarun
file.The examples page includes commands for running various platforms' default projects.
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
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
.
-p, --port PORT
: Specify a PORT
number. If a URL
is also specified, then the PORT
and URL
will be combined, otherwise localhost will be used. The URL
will be loaded after the first output unless a STRING
is also specified.-u, --url URL
: Specify a URL
. If a PORT
is also specified, then the PORT
and URL
will be combined, otherwise no port number will be used. The URL
will be loaded after the first output unless a STRING
is also specified. Leading and trailing whitespace is removed from the URL
.-o, --open FILE
: Specify a FILE
. The FILE
will be opened after the first output unless a STRING
is also specified. Leading and trailing whitespace is removed from the FILE
.-s, --url-string STRING
: Don't load a URL
until after the STRING
is output. Leading and trailing whitespace is removed from the STRING
.-r, --refresh-string STRING
: Refresh each time STRING
is printed. There's no effect until a URL
is loaded. Leading and trailing whitespace is removed from the STRING
.-d, --delay DELAY
: Wait DELAY seconds before loading a URL
. If a STRING
is also specified, the delay happens after the STRING
is found. The default DELAY
is 0.5, the DELAY
can be set to 0
.-f
, --file-refresh
: Refresh each time a file in a subdirectory changes. There's no effect until a URL
is loaded.-h, --help
: Show options help.