Question

How should I set up a web app which uses node.js and apachi (PHP)

Hello,

I am very new to deployment. I have been a learning developer for the last 3 months and I am ready to deploy my first project.

It is a simple web app which uses node.js and php. However I am not sure how I should set it app up. I have a few concerns:

  1. Which Linux distro should I use - for now I am going for Ubuntu since it seems the most popular ?

  2. When I get a droplet in Digital Ocean should it be partitioned somehow or should I install node.js with pm2 and apache all on the same machine ?

  3. When sending the files to the served should the PHP part be kept separate from the JS part of the application ? Or should I deploy the whole project in one directory ?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @kkrumov

  1. I prefer to use Ubuntu server for my projects so you can use it too, it is popular and has enough documentation and guides to work with it.

  2. You can install pm2 and apache on the same droplets, that is okay.

  3. NodeJS and PHP are both for backend you are using them both? How is your project structed in Development if they are together then you can keep them together on the server.

Hope this helps