angular-cli


Serving and testing a bundle after ng build


After I build a bundle with ng build --prod --aot I would like to quickly serve it locally. Is there a way to quickly serve the /dist directory locally using #angular/cli?
I tried to cd dist && ng serve but the dist disappears when the ng serve command is run.
http-server is what I use, and it works well.
Install:
npm install -g http-server
cd into your dist folder, type http-server, then enter. Or, just do http-server .\dist at the command line after your application build is successful.
Open a browser, and go to http://127.0.0.1:8080
More info: https://www.npmjs.com/package/http-server
I use this on all my dev machines for running built ng applications.
Or, was there more than simply seeing if the application runs (smoke test) that you were looking for in this?

Related Links

How to run Angularcli project with https
what is npm i bootstrap#next?
Angular-Cli Best way to manage notices
Puzzling angular-cli AOT error
Create Project with Angular 4 Release using angularcli
addons removed in angular-cli.json whats the replacement
angular-cli: ng serve command with config error
Augury Angular-cli When I installed the augury .Error is as follows
Teamcity for building Angular cli app
angular cli update issue on local folder
Access to -aot parameter in code
Missing peer dependencies after installing latest angular-cli: What to do?
angular-cli ng serve : Error: No errors
Getting error after Angular cli update
Does angular-cli uses rollup to do ahead-of-time compilation and adding all into one file?
Angular CLI install error

Categories

HOME
crate
scipy
aem
tomcat7
survival-analysis
concourse
jrebel
yocto
bro
ndis
xlsx
tee
public-key-encryption
rapidjson
lstm
cross-platform
phpbb
grub2
flexlm
hhvm
source-maps
pdfsharp
branch
interrupt-handling
invoke-command
pep8-assembly
superscript
lmdb
mmdrawercontroller
poco-libraries
sql-like
soundjs
xbim
filepath
number-theory
jags
rollback
workflow-foundation-4.5
pluck
infinite-scroll
opencpu
redux-router
vici
efxclipse
barcode-printing
project-template
audioqueue
bacnet
freetype2
database-backups
mongoskin
mongo-c-driver
test-class
android-viewholder
file-diffs
ninject.web.mvc
uialertview
sevenzipsharp
leadtools-sdk
start-job
suffix-array
csplit
adaptive-compression
bullet
zipalign
jquery-tabs
wic
gamepad
loop-invariant
google-closure-library
fraud-prevention
xslkey
ubuntu-11.10
socketstream
hibernate3
visual-web-gui
v4l
viewdidload
testunit
scalaxb
pivotal-crm
libavformat
sitemappath
task-management
openvg
webrat
writing

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App