Lightweight development only node server that serves a web app, opens it in the browser, refreshes when html or javascript change, injects CSS changes using sockets, and has a fallback page when a route is not found.
Questions tagged [lite-server]
125 questions
15
votes
2 answers
how to prevent lite-server from opening browser window on startup?
I'm using the lite-server with npm run lite
my config file,
module.exports = {
"server": { "baseDir": "./src" }
};
whenever I start the server, it opens up a new browser window. How do I prevent lite server opening browser window on server…
user5170375
12
votes
2 answers
How can you specify UI port for lite-server?
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:…

MrLehiste
- 1,018
- 1
- 8
- 14
11
votes
1 answer
npm start does not open browser tab
I am learning angularjs 2.I want to make my first application in angularjs 2 from their official website.So i followed all from here https://angular.io/guide/quickstart. Now in step 6 I have to run a command 'npm start' in terminal.It gives me…

Mohammad Sadiqur Rahman
- 5,379
- 7
- 31
- 45
10
votes
2 answers
For Angular2, why do two pages (two tabs) having the same component affect each other?
This is an Angular2 app, and the component is simplified here as:
@Component({
selector: 'courses',
template: `
{{ wahla }}
`
})
export class…

nonopolarity
- 146,324
- 131
- 460
- 740
9
votes
2 answers
Can't change the base folder for lite-server in Angular 2 application
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…

Konstantin Dinev
- 34,219
- 14
- 75
- 100
8
votes
3 answers
Problem running parallelshell Nodejs script
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":…

Hazem Alabiad
- 1,032
- 1
- 11
- 24
8
votes
4 answers
npm start is not working for Angular 2 QuickStart
While I run npm start
I faced the following error
C:\angular2-quickstart>npm start
> angular2-quickstart@1.0.0 start C:\angular2-quickstart
> concurrent "npm run tsc:w" "npm run lite"
[0]
[0] > angular2-quickstart@1.0.0 tsc:w…

Partha Sarathi Ghosh
- 10,936
- 20
- 59
- 84
7
votes
5 answers
http-proxy-middleware, how to copy all/cookie headers
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…

Avi
- 1,924
- 3
- 17
- 31
7
votes
3 answers
How to serve angular2 app without browsersync
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…

PascalVKooten
- 20,643
- 17
- 103
- 160
6
votes
0 answers
lite-server for production use
I'm now learning Angular 2 and I can see that the tutorials are using lite-server for serving static files. I've read that lite-server is a development-only server, but what's actually the reason it cannot be used in production? Thanks.

Mister_L
- 2,469
- 6
- 30
- 64
6
votes
4 answers
Lite-server does not detect a `bs-config.json` or `bs-config.js` override file
I'm trying to run angular2 based first app. I followed angular2 steps. When i run command npm start then its giving following error in the terminal
Did not detect a bs-config.json or bs-config.js override file. Using lite-server defaults...
And…

Ayaz Ali Shah
- 3,453
- 9
- 36
- 68
6
votes
2 answers
Work Around or Fix for NPM lite-server on Linux error when running Angular 2 Quick Start
I am unable to start the lite-server 2.1.0 using npm on Ubuntu 14.04. I am trying to run the Angular2 Quick Start example.
This problem may be specific to Linux and only started to occur after a recent update to Ubuntu. I am able to run the…

Heather92065
- 7,333
- 6
- 31
- 39
5
votes
1 answer
Can an Angular-CLI project be run with lite-server rather than ng serve?
Apologies for a very newb question, but can a project created with the Angular-CLI (which seems to only be able to run with ng serve) be run instead with lite-server, as it currently is on Angular's own Quickstart page?
As a beginner I appreciate…

davidlav
- 636
- 5
- 17
5
votes
2 answers
Browser-sync - serve "node_modules" out of "src" directory
I'm using browsersync via lite-server, and have the following configuration:
{
"port": 8000,
"files": [
"./src/**/*.{html,htm,css,js}"
],
"server": {
"baseDir": "./src",
"routes": {
"node_modules":…

Cristian E.
- 3,116
- 7
- 31
- 61
4
votes
1 answer
Lite Server hot reload doesn't work for default config
Lite Server doesn't reload the page upon making changes to my index.html file.
I'm not using a bs-config.json file. My index.html opens correctly in a new tab when starting lite server using :
npm run dev
This console info might help:
> lite@1.0.0…

Ole EH Dufour
- 2,968
- 4
- 23
- 48