The backend listens to all interfaces by default (#1962)

* The backend listens to all interfaces by default

Previously,  if you did not specify a host,  it would only
listen to localhost,  so it would not accept connections from the network.

If you use the default generated app,  it is configured to listen to 0.0.0.0
which only listens to IPv4 interfaces.

This changes the default behavior, just listen to all interfaces.

* Add some comment
This commit is contained in:
Paul Pacheco
2020-08-16 02:08:36 -05:00
committed by GitHub
parent fe48229005
commit 4cf6cf3b6c
3 changed files with 2 additions and 3 deletions
-1
View File
@@ -5,7 +5,6 @@ app:
backend:
baseUrl: http://localhost:7000
listen:
host: 0.0.0.0
port: 7000
cors:
origin: http://localhost:3000
@@ -33,7 +33,8 @@ import { ServiceBuilder } from '../types';
import { readBaseOptions, readCorsOptions } from './config';
const DEFAULT_PORT = 7000;
const DEFAULT_HOST = 'localhost';
// '' is express default, which listens to all interfaces
const DEFAULT_HOST = '';
export class ServiceBuilderImpl implements ServiceBuilder {
private port: number | undefined;
@@ -8,7 +8,6 @@ organization:
backend:
baseUrl: http://localhost:7000
listen:
host: 0.0.0.0
port: 7000
cors:
origin: http://localhost:3000