Npm start but cannot preview


#1

Greeting.

I clone the angular 2 quick start and follow the instructions in the tutorial

I did a npm start but when I go to preview running app it says the app is not running ??>

ah0ha:~/workspace/quickstart/app (master) $ npm start

angular2-quickstart@1.0.0 start /home/ubuntu/workspace/quickstart
tsc && concurrently “tsc -w” “lite-server”

[1] Did not detect a bs-config.json or bs-config.js override file. Using lite-server defaults…
[1] ** browser-sync config **
[1] { injectChanges: false,
[1] files: [ ‘./**/*.{html,htm,css,js}’ ],
[1] watchOptions: { ignored: ‘node_modules’ },
[1] server: { baseDir: ‘./’, middleware: [ [Function], [Function] ] } }
[1] [BS] Access URLs:
[1] ---------------------------------------
[1] Local: “http://localhost:3000
[1] “External: http://172.17.200.197:3000
[1] ---------------------------------------
[1] UI: “http://localhost:3001
[1] UI External: “http://172.17.200.197:3001
[1] ---------------------------------------
[1] [BS] Serving files from: ./
[1] [BS] Watching files…
[1] 16.09.19 23:55:05 200 GET /index.html
[1] [BS] File changed: app/app.component.js
[1] [BS] File changed: app/app.component.spec.js
[1] [BS] File changed: app/app.module.js
[1] [BS] File changed: app/main.js
[1] [BS] File changed: e2e/app.e2e-spec.js
[0] 11:55:08 PM - Compilation complete. Watching for file changes.


#2

you need to use ports 8080 8081 instead of 3000 and 3001 and 0.0.0.0 as ip


#3

How do you do that - there is no configuration file visible for that.


#4

Usually there is somewhere in the code, i could help you if you share the workspace.


#6

http://stackoverflow.com/questions/35516783/how-can-you-specify-ui-port-for-lite-server

It works after I put bs-config.json in the quickstart root directory


#7

Conforme informado acima o aplicativo funcionou apenas colocando a porta no arquivo bs-config.json na diretório raiz da aplicação. Segue abaixo como ficou a configuração do arquivo:

{
“port”: 8080,
“server”: {
“baseDir”: “src”,
“routes”: {
"/node_modules": “node_modules”
}
},
“ui”: {
“port”: 8081
}
}