How to allow access outside localhost
1. view open port
[root@thermalite ~]# firewall-cmd --list-ports
9000/tcp 9001/tcp 1433/tcp 8080/tcp 5000/tcp
[root@thermalite ~]# firewall-cmd --permanent --add-port 4200/tcp
success
[root@thermalite ~]# systemctl restart firewalld
[root@thermalite ~]# firewall-cmd --list-ports
9000/tcp 9001/tcp 1433/tcp 8080/tcp 5000/tcp 4200/tcp
[malex@thermalite hello-world]$ ng serve --host 0.0.0.0
Your global Angular CLI version (10.0.1) is greater than your local
version (10.0.0). The local Angular CLI version is used.
To disable this warning use "ng config -g cli.warnings.versionMismatch false".
WARNING: This is a simple server for use in testing or debugging Angular applications
locally. It hasn't been reviewed for security issues.
Binding this server to an open connection can result in compromising your application or
computer. Using a different host than the one passed to the "--host" flag might result in
websocket connection issues. You might need to use "--disableHostCheck" if that's the
case.
chunk {main} main.js, main.js.map (main) 57.7 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 141 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.15 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 12.4 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 2.41 MB [initial] [rendered]
Date: 2020-07-03T18:38:33.009Z - Hash: 1c609b822fe9cba12387 - Time: 6023ms
** Angular Live Development Server is listening on 0.0.0.0:4200, open your browser on http://localhost:4200/ **
: Compiled successfully.
Open browser: http://192.168.1.100:4200
No comments:
Post a Comment