-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix port restart issue #156
Conversation
b391c63
to
cfe571e
Compare
it should check and delete in start.js |
@@ -1,6 +1,7 @@ | |||
var basicAuth = require('basic-auth'), | |||
prompt = require('prompt'), | |||
portScanner = require('portscanner'); | |||
portScanner = require('portscanner'), | |||
fs = require('fs'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be alphabetical.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mm, it wasn't before either, so lets just focus on the bug fix
Nice fix! I added some comments. In particular, port is configured using |
try { | ||
port = Number(fs.readFileSync(__dirname+'/../.port.tmp')); | ||
} catch (e){ | ||
port = (process.env.PORT || config.port.tmp); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be config.port
, not config.port.tmp
.
LGTM 👍 we can merge as soon as CI passes. |
fix port restart issue #148
when a new port is automatically chosen, it's stored in a file:
/port.tmp
when the kit restarts on a file change, it looks for the port here first
when the kit is closed (
ctrl+c
) theport.tmp
file is deleted.