How do I add a URL subdomain for my server?

Viewed 10

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 at routes from example.com/api/something.

When I try and connect my domain to my Droplet it gives some DNS records to add. 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?

0 Answers
Related