Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/app/frontend/FrontendSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,17 @@ class FrontendSettings {

/**
* Sets the IP address.
* @param {string} [ip='0.0.0.0'] The local IP address
* @param {string} [ip='127.0.0.1'] The local IP address
*/
async setIpAddress (ip = '0.0.0.0') {
async setIpAddress (ip = getLocalIpAdresses()) {
const settings = (await this.loadSettings())
settings.ip = ip
await this._saveSettings(settings)
}

/**
* Sets the startpage IP address.
* @param {string} [startpageIp='0.0.0.0'] The network IP address
* @param {string} [startpageIp='127.0.0.1'] The network IP address
*/
async setStartpageIpAddress (startpageIp = getLocalIpAdresses()) {
const settings = (await this.loadSettings())
Expand Down
2 changes: 1 addition & 1 deletion lib/app/frontend/FrontendSetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class FrontendSetup {
const sourceMapsType = await settings.getSourceMapsType()

return {
ip: '0.0.0.0',
ip: startpageIp || getLocalIpAdresses(),
startpageIp: startpageIp || getLocalIpAdresses(),
port: port || 8080,
apiPort: apiPort || 9666,
Expand Down
2 changes: 1 addition & 1 deletion test/app/frontend/FrontendSetup-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const FrontendSetup = proxyquire('../../../lib/app/frontend/FrontendSetup', {
})

const defaultConfig = {
ip: '0.0.0.0',
ip: '127.0.0.1',
port: 8080,
apiPort: 9666,
hmrPort: 3000,
Expand Down
8 changes: 4 additions & 4 deletions test/app/frontend/rapidDevServer/RapidDevServer-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ describe('RapidDevServer', () => {
it('should validate the environment', (done) => {
const spy = sinon.spy(rapidDevServer, 'validateEnvironment')

process.env.ip = '0.0.0.0'
process.env.ip = '127.0.0.1'
process.env.apiPort = 9666

rapidDevServer.start()
Expand All @@ -144,7 +144,7 @@ describe('RapidDevServer', () => {

describe('createServer()', () => {
beforeEach(() => {
process.env.ip = '0.0.0.0'
process.env.ip = '127.0.0.1'
process.env.apiPort = 9666
})

Expand Down Expand Up @@ -180,7 +180,7 @@ describe('RapidDevServer', () => {

describe('setErrorHandlers()', () => {
beforeEach(() => {
process.env.ip = '0.0.0.0'
process.env.ip = '127.0.0.1'
process.env.apiPort = 9666
})

Expand Down Expand Up @@ -213,7 +213,7 @@ describe('RapidDevServer', () => {

describe('setRoutes()', () => {
beforeEach(() => {
process.env.ip = '0.0.0.0'
process.env.ip = '127.0.0.1'
process.env.apiPort = 9666
})

Expand Down