By Ivan Diaz
Currently I’m developing an API REST with NodeJS. What I want to do is everytime an User register in my system, create a new droplet, deploy and run an instance of the API REST previously mentioned and add a new DNS record for that new Droplet.
I don’t know if I can achieve that requirement with tools like Chef or Terraform.
Any ideas?
Thanks in advance.
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 could integrate your API with the digital ocean API and create a new Droplet (with the help of the request module).
https://developers.digitalocean.com/documentation/v2/#droplets
You could use the same API to create your DNS records by the looks of things.
https://developers.digitalocean.com/documentation/v2/#domain-records
I imagine that you’re probably already aware that this level of automation is risky business (given that you could incur significant charges if your API is insecure).
Good luck!
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.