I recently purchased a Digital Ocean Droplet and need to connect it to a domain. I have a landing page available at example.com, but I want my frontend to send requests to the server that go to routes like example.com/api/something.
When I try and connect my domain to my Droplet it gives some DNS records to add, but it says my hostname is example.com. This isn’t going to make it so that my existing frontend can’t be accessed at example.com, right? Also, my backend is built in express/node.js, so does doing something like router.get(“/api/something”); automatically create that subdirectory, or do I have to explicitly create it?
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!
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.
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.
Click below to sign up and get $200 of credit to try our products over 60 days!