Skip to content

trezapeter89/netlify-express

Repository files navigation

Express.js on Netlify Example

Netlify Status

Deploy to Netlify

An example of how to host an Express.js app on Netlify using serverless-http. See express/server.js for details, or check it out at https://netlify-express.netlify.com/!

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 http://localhost:3000/.netlify/functions/server
curl http://localhost:3000/.netlify/functions/server/another
curl --header "Content-Type: application/json" --request POST --data '{"json":"POST"}' http://localhost:3000/.netlify/functions/server
curl http://localhost:3000/.netlify/functions/server/todos

Plese define environment variable for mongoconnection in .env file

MONGO_CLUSTER= MONGO_PASSWORD= MONGO_USER=

on deployed app

App : https://express-demo.netlify.app/.netlify/functions/server/another

https://express-demo.netlify.app/.netlify/functions/server

https://express-demo.netlify.app/.netlify/functions/server/todos

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published