store the server function in an atom and execute on GET