Reputation: 456
when i install http-server in c: drive it install automatically in d: drive.
here is the result:-
C:\Users\Kuncham>npm install http-server -g
D:\usr\local\http-server -> D:\usr\local\node_modules\http-server\bin\http-server
D:\usr\local\hs -> D:\usr\local\node_modules\http-server\bin\http-server
+ [email protected]
updated 1 package in 1.131s
after installation when i run http-server in my project folder it will start the http-server and also we can access the link given in command prompt. the browser will show only files not run the my angular application.
Upvotes: 2
Views: 11005
Reputation: 1909
I just installed http-server today and my problem was it just wasn't serving the content at all when I went to localhost:8080. The command prompt would flash for a second and disappear. I resolved my problem by hitting http://192.168.40.78:8080. http-server lists two urls you could hit. The 192 one worked, but not the localhost one.
Upvotes: 1
Reputation: 31
Upvotes: 3
Reputation: 44698
Perform an ng build
on the directory and point your http-server
at the resulting dist/
folder, which contains the compiled HTML and Javascript files your browser can consume.
More information: Angular - Deployment
Upvotes: 2
Reputation: 301
specify the file when running http-server
http-server [path] [options]
[path] defaults to ./public if the folder exists, and ./ otherwise.
Upvotes: -2