Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploy angularjs application in Node.js

Hello I am following this tutorial from the AngularJS documentation.

I am trying to use this approach for learning this.

You will need an http server running on your system. Mac and Linux machines typically have Apache pre-installed, but If you don't already have one installed, you can use node to run scripts/web-server.js, a simple bundled http server.

My server is started but the only things that happens on localhost:8000 (the port its running on) is that files get listed.

How do I deploy with Node.js?

When I navigate to localhost:8000 in my browser, this is my server log.

112-108-15:scripts phe$ ./web-server.js
Http Server running at http://localhost:8000/
GET / Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.65 Safari/537.36
GET / Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.65 Safari/537.36

like image 406
pethel Avatar asked Jul 22 '26 09:07

pethel


1 Answers

As you can see the instruction, you need to run

node ./scripts/web-server.js

and go to http://localhost:8000/app/index.html.

like image 185
eqot Avatar answered Jul 24 '26 01:07

eqot



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!