need help on the endpoint for fetching from my own server API from within a Keroku app in production

my stack overflow post is here

https://stackoverflow.com/questions/62906227/need-help-on-the-url-for-fetching-from-within-an-app-on-heroku

as of now, I have a fetch request in development mode to query the api exposed at localhost:3000/send-email.

axios.post('http://localhost:3000/send-email', data) .then(() => { setSent(true) }) .then(() => { resetForm() }) .catch((err)=> { console.log('Message not sent', err) }) 

When I deploy to heroku, I am no longer wanting to point to localhost. What do I change it to? would it be just pointing to my own domain name like this?

axios.post(`http://www.example.com/send-email`, data) 

I can't seem to find the right thing to search for for this step.

submitted by /u/dbnoisemaker
[link] [comments]

from Software Development – methodologies, techniques, and tools. Covering Agile, RUP, Waterfall + more! https://ift.tt/32hBhz3

Leave a comment

Design a site like this with WordPress.com
Get started
search previous next tag category expand menu location phone mail time cart zoom edit close