Make sapper run listen to different port

I comeup with one issue today. I wanted to run 2 sapper aplication simultaniously in same erver. When I tried the both sapper applications are trying to listen to same port 3000.

To make sapper listen to another port rather than PORT 3000 you need to pass additional parameter along with npm run start command.

$: PORT=4000 npm run start

The above command will make the sapper app to run on port 4000. Between make sure your port 4000 is open under your firewall settings.

If you are using ufw as firewall you may try the following.

$: sudo ufw allow 4000


  • Roopz © 2020