By pgeorgesdpt
It’s my first time using DigitalOcean and I just created a node.js 6.9.1 one-click droplet. I’m able to connect to it via SFTP.
I’m wondering:
Cheers!
Paul
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!
Hi.
You should be able to call Node.js by executing nodejs (if that’s not working it’s node, but I think default is nodejs, can’t check now).
To check version if you want:
- nodejs --version
To check where is it installed, which will help you. It’ll return where binary is located:
- which nodejs
You can put code anywhere where you want. Then you start it with:
- nodejs app.js
As this is working until you close session, you probably want to setup pm2 or forever. It’ll help you to run node apps as a service. DigitalOcean has great tutorial on this topic, covering everything you’ll need - How To Set Up a Node.js Application for Production on Ubuntu 16.04.
This comment has been deleted
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.