9951 explained code solutions for 126 technologies


nginxUsing NJs example (JS code file)


function test(r) {
  r.return(200, "Hi everyone");
}

export default {test}ctrl + c
test()

sample function that is called from Nginx

r.return

returns HTTP response

200

HTTP status code

Hi everyone

sample body to return

export default

list what we want to use in Nginx