Arjun sr
Arjun sr

Reputation: 161

How to setup an Angular project on local server that is already running on real server?

I have to work on an project worked by someone else,that is already deployed and running on a real server.I have downloaded the public_html folder content.I have also created a new Angular project project locally using the command

ng new my_app

and run that on server using the command

ng serve

That is working fine.How I can run the project I downloaded, in local server?. The back end is done in PHP and the database is MySQL

Upvotes: 0

Views: 1240

Answers (3)

Johns Mathew
Johns Mathew

Reputation: 812

That probably might not work.

You would have all sorts of components, services and modules in an angular application. When you build the application for deployment, all these would be compiled. All typescript code is compiled to ES5, SCSS to CSS and everything is bundled in js files. When you download the source from a live server, you are probably getting this bundled version. If you want to develop further on that, you need the actual angular source files from which it was bundled.

Upvotes: 1

Raahul
Raahul

Reputation: 397

For real server setup.

  1. Install Xampp ( if you need to use PHP and SQL )
  2. Import sql exported from sever to phpmyadmin. ( create new database )
  3. place the php files inside xampp/htdocs folder
  4. In Angular change the API to point to the local setup.
  5. run angular project and xampp

Upvotes: 1

Pushprajsinh Chudasama
Pushprajsinh Chudasama

Reputation: 7949

The project you downloaded , In Linux downloaded project directory must be in var/www/html

Then run command npm install and then run ng serve .

Hope, this solution works for you.

Upvotes: 1

Related Questions