By cmessiter
I want to deploy a Node web app (with Express) to a droplet. I’ve used MySQL for database management on my local machine.
I also have Cron running PHP scripts which scrape an external website for data, and insert this data into the database.
What would be the best way to get this live?
Could I setup a one-click Node.js app, then install the MySQL server and Cron, and migrate the PHP scripts and the cronjob to this droplet?
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!
You can install the one-click NodeJS image to a Droplet and then proceed to install MySQL and PHP using the package manager provided by Ubuntu, yes. You’ll still be provided with root access to the Droplet, so you could install other packages as well, if needed.
If you’re only running PHP scripts from CRON you’d at least need PHP’s CLI package, though if you want to run PHP scripts from the web browser at any point, I’d recommend also installing NGINX and using PHP-FPM. You would then setup NGINX as a reverse proxy and it would handle proxying to both PHP and your NodeJS application(s).
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.