From a33f817989b27554b2939d813b6c8108ae4a007b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=9D=E3=83=BC=E3=83=AB=20=E3=82=A6=E3=82=A7=E3=83=83?= =?UTF-8?q?=E3=83=96?= Date: Mon, 24 Sep 2018 18:05:53 -0500 Subject: [PATCH] Updated README and improved port snippet --- README.md | 4 +--- server.js | 6 +++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c82d7ab..adb8b94 100755 --- a/README.md +++ b/README.md @@ -18,10 +18,8 @@ -## Notes -- Requires our private `web-daemon` to be running locally (in development) when interacting with the Tour. - ## Prerequisites +- [lbry/web-daemon](https://github.com/lbryio/web-daemon) - [Node](https://nodejs.org) (version >= 10) ## Installation diff --git a/server.js b/server.js index d234255..e1bd3a7 100755 --- a/server.js +++ b/server.js @@ -158,7 +158,11 @@ fastify.ready(err => { const start = async () => { try { - await fastify.listen(process.env.PORT || 8080, process.env.IP || "0.0.0.0"); + await fastify.listen( + process.env.NODE_ENV === "development" ? + 8080 : + process.env.PORT + ); } catch (err) { fastify.log.error(err); process.exit(1);