Hello,
I am trying to add a custom domain using render API.
There are two things I’m not sure of.
- What my serviced is - I assumed its in the URL, something like this - srv-ceerma33rgb3r0ohtdu5
- Can I test this on localhost or must it be from my domain?
from this docs - Add custom domain this is what the code looks like using vanilla javascript.
Any help would be much appreciated.
const options = {
method: 'POST',
headers: {accept: 'application/json', 'content-type': 'application/json'},
body: JSON.stringify({name: 'themedulla.com'})
};
fetch('https://api.render.com/v1/services/srv-ceerma14reb3r0ohuqu0/custom-domains', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));