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

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
Using glob for assets in angular-cli throws error
Importing Global SCSS into Component SCSS with Angular-CLI
Error during AOT build with angular-cli 24 and Angular 2.4.1
Add importer to node-sass in angular-cli project
angular-cli#1.0.0-beta.23 (2016-12-15) NOT on npm
Angular cli for existing github project
How to pass config data to NgModule so NgModule will be compiled with AOT
Cloning a repo based on Angular CLI

Categories

HOME
cakephp-3.x
redis
project-management
meshlab
ipython
translation
thunderbird-addon
cocos2d-x-3.0
safari
flyway
apple-numbers
terrain
algorithmic-trading
sequelize.js
schemacrawler
docker-windows
goutte
wordpress-theming
camera-calibration
viber
equalizer
multiple-monitors
datagrip
ios10.3
tortoisegit
tflearn
weinre
red-black-tree
piecewise
expand
polymorphism
receipt
swiftcharts
nsurlconnection
ksoap
broadleaf-commerce
discord.net
haskell-pipes
linq-to-entities
polyfills
twiki
socketscan
viewgroup
dojox.mobile
amd
z3py
filepath
fqdn
workflow-foundation-4.5
google-maps-ios
jszip
svn-merge
galleriffic
dojox.charting
soda
mercurial-hook
coordinate-transformation
mpeg-4
except
cctray
ninject.web.mvc
oai
abas
rx-groovy
apache-mina
stackframe
consensus
jquery-autocomplete
mser
fragment-tab-host
node-inspector
outline
proxies
colt
dvcs
bignum
sslexception
astyanax
sttwitter
visual-studio-2003
prng
process-monitor
arbor.js
trailing-slash
sequelpro
css-tables
sunspot-rails
fotoware
mpmovieplayer
parameterization
visual-web-gui
flexicious
nintendo
mysql-error-1045
paintcomponent
gtk2hs
server-error
nvelocity
loadui
msn
quick-search
gwt-2.2-celltable
callgrind
odbc-sql-server-driver
castle-validators
outlook-form
msf

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