HELLO WORLD!
Express / EJS / Serverless / Netlify
- Server Configuration:
- server.js uses serverless-http to wrap the Express app for serverless deployment.
- app.js sets up the Express app, configures EJS as the view engine, serves static files, and defines a
route for rendering the index.ejs template.
- Netlify Configuration:
- netlify.toml specifies build command, functions directory, and included files. It defines redirect
rules
for images, CSS, and all other requests to the serverless function.
- View Templates:
- index.ejs is an EJS template that renders an HTML page with a title, CSS styles, and an image.
- Package Configuration:
- package.json lists project dependencies and provides metadata about the project.