Changing paths to functions

I copied this but I don’t see where/how I can make these endponts something like

example.com/hello instead of https://hardcore-sammet-4f1264.netlify.com/.netlify/functions/hello

I thought it’d be in the TOML somewhere but I’m at a loss. Is this even possible?

github: https://github.com/jacebenson/functions

Hi @jacebenson, what you’re looking for is proxy redirects. If you’re using a _redirects file, then it’ll look like:
/hello /.netlify/functions/hello 200

The netlify.toml syntax is a bit different but the idea should be the same.

I am going to have to play around with that… I cannot seem to get this to work. I’m trying with a Joke API I have;


And then also with _redirects file…
https://joke.jace.pro/.netlify/functions/server/ works but, I can’t get that to render at https://joke.jace.pro/joke

I missed a critical part of the _redirects file. It should end up in your dist or public folder, whereever your build assets exist after running… Once copying it from root / there. It works locally… Not on the actual netlify platform yet.

hi @jacebenson - you might also poke around in #topics:redirects to see if there is useful information you need, or start a different thread in that category :slight_smile: