Angular2 Cli-Server app. How to deploy to the WEB network

7 views
Skip to first unread message

Tsvetomir Tsanev

unread,
Oct 2, 2020, 8:40:51 AM10/2/20
to Angular and AngularJS discussion

I have Angular 2 app which structure is like this.

(Email server) and inside I have my (client side app).

Email server ( client side inside)

After "ng build -- prod" My app is compiled and I can start it.

1. Move all compiled files from "dis" directory into Server folder where is my server.js file

2. I start my app via command " nodemon server.js"

 

This command starts my server on specific port (3080) and that is. When I open browser and type "localhost:port" everything works.

My question is when I do deploy on my web site to some web host (VPS) how to say on the server to start from " nodemon server.js"?

Or probably I have to do something else like to generate somehow index.html page which should to invoke server.js file?

Ot to do specific settings in some .json file?

Tsvetomir Tsanev

unread,
Oct 2, 2020, 8:40:51 AM10/2/20
to Angular and AngularJS discussion
Reply all
Reply to author
Forward
0 new messages