Rico Picone
Rico Picone

Reputation: 401

Two Pakyow servers simultaneously

I have been developing two different Pakyow webapps. When I run one of the apps locally with the command pakyow server, it is available at tcp://0.0.0.0:3000/. However, if I try to run both apps simultaneously, the second one started throws (from binder.rb) the error Address already in use - bind(2) for "0.0.0.0" port 3000 (Errno::EADDRINUSE).

Clearly I cannot use the same port for both apps, but I do not know how to run the second app on a different port.

Upvotes: 0

Views: 40

Answers (2)

skylenewman
skylenewman

Reputation: 17

In addition to what @bryanp said, you can also add

server.port = 3001

to your app/setup.rb file if you don't want to worry about passing an argument each launch.

Upvotes: 1

bryanp
bryanp

Reputation: 437

You can use the -p flag to start an app on a specific port. For example:

pakyow server -p 3001

Upvotes: 1

Related Questions