lite-server

For Angular2, why do two pages (two tabs) having the same component affect each other?

為{幸葍}努か 提交于 2019-11-27 23:56:06
问题 This is an Angular2 app, and the component is simplified here as: @Component({ selector: 'courses', template: ` <input [(ngModel)]="wahla"> <input [(ngModel)]="wahla"> {{ wahla }} ` }) export class CoursesComponent { wahla = "hmm hmm ha ha"; } I think the app works fine in one page with the two-way binding, but if I open up another tab with http://localhost:3000/ and then paste something or type something in the first page's first input box, then the second tab actually gets updated for its

How can you specify UI port for lite-server?

旧时模样 提交于 2019-11-27 07:43:28
问题 When you start up lite-server, you can specify port for example lite-server -- port 8000 Which gives you the following result: [BS] Access URLs: ------------------------------------ Local: http://localhost:8000 External: http://192.168.0.5:8000 ------------------------------------ UI: http://localhost:3001 UI External: http://192.168.0.5:3001 How can I change the port for UI which is 3001 by default (either command line and/or in bs-config.json file), to like 8001? 回答1: Since lite-server uses

Can't change the base folder for lite-server in Angular 2 application

人走茶凉 提交于 2019-11-27 06:46:46
问题 I am going through the 5 minute quickstart of Angular 2. However, my application resides in src/ folder instead of at the root of my repository, and when I run npm start the application is trying to find an index.html file at the root. I read up on lite-server and documentation shows that it uses BrowserSync and I can reconfigure BrowserSync with a bs-config.json in my repository. I did that and this is what my config looks like: { "port": 8123, "server": { "baseDir": "./src" } } According to