Is it possible to run an Angular -CLI project using lite-server instead of ng?

Sorry for the very new question, but can a project created using Angular -CLI (which, apparently, can only work with ng serve), instead lite-server, since it currently has its own Quickstart page on Angular?

As a newbie, I appreciate the simplicity lite-serverin that it seems that not all smokes and mirrors with the combined files together are very opaque, as it ng serveseems to work with Webpack. I am sure that there are reasons for this, but this does not help me understand what is happening under the hood at this moment, as I am simply wet wearing.

Is there an easy way to modify what the CLI throws to start with lite-server, or should I just continue to create new projects by cloning Quickstart rather than using the CLI tool?

Thank you for understanding!

+4
source share
1 answer

Script to run an Angular application on a Lite server

devDependencies must contain lite server dependencies

Step 1: Please check the configuration above in the package.json file. If it is not available than code similar to the above images. Step 2: Delete the node-modules module folder. Step 3: the team of the fire brigade npm the install . (He will install all your dependencies again) Step 4. Launch the application.

Lite Lite Server

0

Source: https://habr.com/ru/post/1658519/


All Articles