user10071706
user10071706

Reputation:

Deploy Angular 2 website to EcoWebhosting

I made a one page website with Angular 2 (localhost) and I'm trying to deploy it on EcoWebHosting. I uploaded the entire site with Filezilla but it didn't work. How can I do it? I found a similar question here on stackoverflow but the links provided for the solution are broken. I read that I have to import a few javascript files in my index.html file but I don't know what to do exactly. I need a solution step by step because I'm a newbie with Angular.

Thank you.

Dorina

Upvotes: 0

Views: 151

Answers (1)

user4676340
user4676340

Reputation:

  1. Build your application with the CLI.

In your console, run

ng build --prod

At the root of your project.

  1. A dist folder has been generated. This is your SPA (Single Page Application).

  2. Take the content of that dist folder, and sent it with your FTP to your website.

You have nothing else to do. Everything has been done for you by the CLI.

Upvotes: 2

Related Questions