Ngx-admin: how run project with local ip address?

Created on 18 May 2017  路  1Comment  路  Source: akveo/ngx-admin

project run on
localhost:4200
but it does not run on (which is my localhost)
10.0.0.30:4200
need to install angular cli ?

question

Most helpful comment

I think you only need to edit your package.json file

"scripts": {
    "ng": "ng",
    "rimraf": "rimraf",
    "changelog": "standard-changelog",
    "start": "ng serve --host 10.0.0.30",  <==== add --host XX  and you are all set.
    "start:hmr": "ng serve --hmr",
    "start:aot": "ng serve --aot",
    "start:prod": "ng serve --prod",
    "start:prod:aot": "ng serve --prod --aot",
    "build": "npm run clean:dist && ng build",
    "build:prod": "npm run build -- --prod",

after that you run npm start, it will listen on the IP address you specified.

>All comments

I think you only need to edit your package.json file

"scripts": {
    "ng": "ng",
    "rimraf": "rimraf",
    "changelog": "standard-changelog",
    "start": "ng serve --host 10.0.0.30",  <==== add --host XX  and you are all set.
    "start:hmr": "ng serve --hmr",
    "start:aot": "ng serve --aot",
    "start:prod": "ng serve --prod",
    "start:prod:aot": "ng serve --prod --aot",
    "build": "npm run clean:dist && ng build",
    "build:prod": "npm run build -- --prod",

after that you run npm start, it will listen on the IP address you specified.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

burtonator picture burtonator  路  3Comments

igorls picture igorls  路  3Comments

fabltd picture fabltd  路  3Comments

nsankaranarayanan picture nsankaranarayanan  路  3Comments

Kalaijagdai picture Kalaijagdai  路  4Comments