angular


Changing Server port on Angular 2


i am trying to change the default "4200" port.
I tried adding the bs-config.json under src like this:
{
"port": 9002,
"files": ["./src/**/*.{html,htm,css,js}"],
"server": { "baseDir": "./src" }
}
but it did not work.
Moreover i searched in my whole project for port 4200 but i did not find the real configuration.
Please help me with this .
Thanks.
UPDATE
i added .ember-cli file in project root with custom port :
{
"port": 9002
}
and it works.
Depends on what server software you're using, but based on your port and configuration it's most likely one of these:
Angular2-cli
If you are using something like
ng serve
You are using angular2-cli, and need to provide at port argument like so:
ng serve --port 9002
Source: https://github.com/angular/angular-cli#usage
lite-server
If you're using lite-server, your configuration looks correct, so ensure the configuration is loaded at startup. The console output normally says something like 'couldn't find bs-config.json, using default settings'

Related Links

FormControl in Angular 2
Angular2 http json request
Angular 2 John Papas' Seed Project with simple Apache Server
Angular2 is converting an Array to String
Show page not found in Angular2
Angular2 SELECT OPTION after pipe executes
Angular2 - EXCEPTION: TypeError: Cannot read property 'screen' of undefined
Angular 2: onChanges() is not reflecting Object value changes
How to call ViewChild in runtime?
Angular2 not detecting change to object value
Getting values of looped template using angular2 forms
Breeze and Angular2
Angular 2 hide/show template
Angular 2 RC1 - Auto import all used components inside a base component
Add Lodash to VS2015 Angular2 Project
cannot find module errors after upgrading to angular-2.0.0-rc.4

Categories

HOME
inno-setup
web-crawler
import
binary
outlook-addin
external
rpres
memcached
spring-transactions
visio
boost-intrusive
docbook
sql-azure
adodb-php
atlassian-sourcetree
web-component
pad
derivative
nlog
selenium-rc
stackdriver
packet-capture
sitefinity
tv
react-apollo
pki
gembox-document
actionlink
ply
rubinius
pi4j
radius
servicestack.redis
protobuf-c
ggiraph
appery.io
magnolia
package-name
android-debug
crossfilter
spamassassin
interactive
homescreen
digestive-functors
uievent
mlt
lsof
pwd
wistia
lpc
wamp-protocol
wso2-appm
ikvm
wso2dss
heyzap
same-origin-policy
android-gson
google-api-v3
leap-motion
syncsort-dmx-h
dde
apple-watch-complication
unreal-blueprint
user-mode-linux
mime-mail
ibm-jazz
datamapper
pagerslidingtabstrip
argo
supercsv
authentication-flows
protractor-net
approximation
joptimizer
eazfuscator
agsxmpp
ironscheme
xcode-organizer
duplicate-removal
casbah
controltemplate
firstdata
bitmapimage
freetextbox
apiaxle
yepnope
inference
.class-file
outlook-2003
hyperterminal
grit
memory-mapped-files
.lrc
tunneling
smalldatetime

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