By MikeyC
Sorry for the noob question, but I have two projects, a node webapp, and a set of webservices that sit behind the webapp. Only the webapp needs to see the webservices, they do not need to be viewable to the public.
Now, obviously this works fine when I develop locally. For the webservice connection from the webapp, I just specify localhost and the portnumber for the webservices.
However, I’m struggling to do this on my droplet. I have my sites-available set up for the domain of my webapp, and it is working fine. I’m just wondering if I need a further sites-available server block for my webservices considering I have no domain name for them. Do I need one?
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!
Accepted Answer
Hi @MikeyC,
You shouldn’t need a domain for your internal webservices. You should just be able to access them using your IP and the relevant port.
For instance, let’s say you have a service listening on port 4564 and does have some interface. You should be able to reach it by doing something like
telnet XXX.XXX.XXX.XXX 4564
where XXX.XXX.XXX.XXX is your IP address. I’m not entirely sure what your application is about so I can’t give a more to the point answer however, there shouldn’t be any differences than using it locally except the IP address.
Regards, KDSys
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.