lite-server

Problem running parallelshell Nodejs script

家住魔仙堡 提交于 2020-01-13 19:33:28
问题 In my package.json file I have the following scripts: "scripts": { "start": "npm run watch:all", "test": "echo \"Error: no test specified\" && exit 1", "lite": "lite-server", "sass": "node-sass -o sass/ css/", "watch:sass": "onchange 'sass/*.scss' -- npm run sass", "watch:all": "parallelshell 'npm run watch:sass' 'npm run lite'" } Whenever I run my code I got this error message: crs@1.0.0 start /home/hazem/crs > npm run watch:all > crs@1.0.0 watch:all /home/hazem/crs > parallelshell 'npm run

How to serve angular2 app without browsersync

随声附和 提交于 2020-01-02 03:33:10
问题 In my package.json I have the following: ... "scripts": { "tsc": "tsc", "tsc:w": "tsc -w --outDir build", "lite": "lite-server", "start": "concurrent \"npm run tsc:w\" \"npm run lite\" " }, ... and I was wondering how could I start the app using " npm production " or something similar? I'd want to prevent browsersync from running: I just tried with multiple users and it was hilarious to see that they were scrolling "as one". This also happens accross different browsers (but not using

http-proxy-middleware, how to copy all/cookie headers

泪湿孤枕 提交于 2020-01-01 01:18:09
问题 I am using lite server by John Papa with HTTP proxy middleware by chimurai as a dev server. the problem is with my session cookie, I cannot persist the session cookie that comes from the real server. I saw this solution: https://github.com/chimurai/http-proxy-middleware/issues/78 but I see no resemblance to my bs-config.js: var proxy = require('http-proxy-middleware'); module.exports = { port: 3003, server: { middleware: { 1: proxy('demo/webservice/jaxrs', { target: 'https://localhost:8443',

Angular2 Quickstart lite-server crashes

微笑、不失礼 提交于 2019-12-24 15:04:16
问题 Good Morning people from the Internet, Intro While following the Angular2 Quickstart guide I have experienced many times issues where lite-server would crash just after executing npm start . Crash would look like this in your terminal: ERR! Linux 3.19.0-51-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "lite" npm ERR! node v5.7.0 npm ERR! npm v3.8.2 npm ERR! code ELIFECYCLE npm ERR! angular2-quickstart@1.0.0 lite: `lite-server` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at

How to run angular 2 app in background

末鹿安然 提交于 2019-12-11 05:11:11
问题 i have already tried following solution but it is not working. sudo forever start -c "npm start" ./ and package.json file is something like this, look at the start command: (this is not full package.json) "name": "angular2-quickstart", "version": "1.0.0", "scripts": { "lite": "lite-server", "gulp": "gulp", "start": "concurrent \"npm run gulp\" \"npm run lite\" ", "postinstall": "typings install", "tsc": "tsc", "tsc:w": "tsc -w", "typings": "typings" }, 回答1: I'm going to piggyback off of this

lite-server does not load scripts from parent directory in Angular 2 app

做~自己de王妃 提交于 2019-12-11 05:08:11
问题 I am trying to run my application using the lite-server node package but it won't load scripts from the parent directory. I want my index.html in the /src folder because it could be possible in the future to generate a different file to /dist . /node_modules and systemjs.config.js need to stay in the root directory as they won't change. File structure: The src/index.html : <html> <head> <base href="/"> <title>task manager</title> <meta charset="UTF-8"> <meta name="viewport" content="width

How to serve angular2 app without browsersync

青春壹個敷衍的年華 提交于 2019-12-05 07:03:32
In my package.json I have the following: ... "scripts": { "tsc": "tsc", "tsc:w": "tsc -w --outDir build", "lite": "lite-server", "start": "concurrent \"npm run tsc:w\" \"npm run lite\" " }, ... and I was wondering how could I start the app using " npm production " or something similar? I'd want to prevent browsersync from running: I just tried with multiple users and it was hilarious to see that they were scrolling "as one". This also happens accross different browsers (but not using different tabs). You could use serve instead of lite-server. Use the npm start . In newly installed Angular app

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

强颜欢笑 提交于 2019-11-29 06:26:43
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 first input box, while the 2nd input box and the static text do not update. For the first tab,

How can you specify UI port for lite-server?

折月煮酒 提交于 2019-11-28 13:29: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? MrLehiste Since lite-server uses browsersync, it can be changed via BrowserSync options Not sure about command line parameter, but

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

拟墨画扇 提交于 2019-11-28 12:09:44
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 the log it's using the specified config: [1] > todo-app-angular2@1.0.0 lite E:\GitHub\todo-app