{"repo":"johnpapa/lite-server","free":true,"listed":false,"github":"https://github.com/johnpapa/lite-server","clone":"git clone https://github.com/johnpapa/lite-server.git","description":"Lightweight node server","language":"JavaScript","stars":2306,"topics":["nodejs","npm","browsersync","devserver","web","tools","devtools"],"license":"MIT","category":"dev-tools","readme_excerpt":"lite-server 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. Why BrowserSync does most of what we want in a super fast lightweight development server. It serves the static content, detects changes, refreshes the browser, and offers many customizations. When creating a SPA there are routes that are only known to the browser. For example, /customer/21 may be a client side route for an Angular app. If this route is entered manually or linked to directly as the entry point of the Angular app (aka a deep link) the static server will receive the request, because Angular is not loaded yet. The server will not find a match for the route and thus return a 404. The desired behavior in this case is to return the index.html (or whatever starting page of the app we have defined). BrowserSync does not automatically allow for a fallback page. But it does allow for custom middleware. This is where lite-server steps in. lite-server is a simple customized wrapper around BrowserSync to make it easy to serve SPAs. Installation and Usage The recommended installation method is a local NPM install for your project: ...and add a \"script\" entry within your project's package.json file: With the above script entry, you can then start lite-server via: Other options for running locally installed NPM binaries is discussed in this Stack Over","default_branch":null,"files":null,"tree":[],"storefront":"/r/johnpapa","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/johnpapa/lite-server/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}