Host an Express.js app on Netlify using serverless-http.
index.html simply loads html from the Express.js app using
<object>
, and the app is hosted at /.netlify/functions/server
. Examples of
how to access the Express.js endpoints:
curl <hostname>/.netlify/functions/server
curl <hostname>/.netlify/functions/server/another
curl --header "Content-Type: application/json" --request POST --data '{"json":"POST"}' <hostname>/.netlify/functions/server