Running a Harp as a
multihost is the primary purpose of the tool. This command is designed to run and serve a single app located on your computer.
harp server [options] [path]
- port - (Number) Optional, The port the server listens on. Defaults to port
- help - Display the help screen.
- path - (String) Optional, The path you want your server to listen to.
harp server ~/apps/example.com --port 3000
Visiting a running harp app.
We provide a special URL for visiting your application. As port
3000 was specified in the previous command, the Harp app will be running at:
However, you can always fall back to the default URI:
If no port was specified, the app will be available at the default port of
Using Port 80
Sometimes, it is a pain typing in the port every time you visit your locally-running site. By using port
80, you don’t need to type it in. Running Harp on port
80 requires Admin Privileges. On OS X, this means you need to preface the command with
sudo harp server --port 80
If Harp clashes with something that’s already running on port
80, you can resolve the situation with the port conflicts guide.
Harp is production-ready. By specifying an environment variable, extra LRU caching is added to make your site run even faster.
NODE_ENV=production harp server --port 3000