How to write API gateway?

i don’t idea about reverseproxy. can you have any sample code