A small Express and EJS demo app that renders a set of Octocat-themed haikus with matching images.
This project started from the Azure App Service Node.js sample and is set up as a lightweight Codespaces-friendly Node app.
- Express server with EJS views.
- Haiku data loaded from
haikus.json. - Static CSS and image assets served from
public/. - Azure/IIS deployment configuration in
web.config. - Optional image optimization task in
gulpfile.js.
- Node.js
- npm
This repo has been checked locally with Node.js v22.22.3 and npm 10.9.8.
Install dependencies:
npm ciStart the app:
npm startOpen:
http://localhost:3000
For development with file watching:
npm run devHaikus are stored in haikus.json:
{
"text": "rain in seattle,\ndon't forget an umbrella,\nor it will be gloom",
"image": "puddle_jumper_octodex.jpg"
}Images referenced in haikus.json should exist in public/images/.
.
|-- index.js # Express app entry point
|-- haikus.json # Haiku text and image filenames
|-- views/index.ejs # Rendered page template
|-- public/css/main.css # Page styles
|-- public/images/ # Image assets
|-- gulpfile.js # Optional image optimization task
|-- process.json # Process manager config
`-- web.config # Azure/IIS config
Before listing this repository publicly, review these items:
npm auditcurrently reports 86 vulnerabilities, including 3 critical, 53 high, 17 moderate, and 13 low. The direct packages most visibly involved are old versions ofejs,express,nodemon,gulp, andgulp-imagemin, plus their transitive dependencies.package.jsonhas"private": true. That is fine for a public GitHub repo, but it blocks publishing to npm.package.jsonstill uses the original sample metadata: package nameapp-service-hello-world, descriptionSimple Hello World Node.js sample for Azure App Service, and authorMicrosoft. Update these if this repo should represent your project.LICENSEis MIT and still names Microsoft Corporation. Confirm that attribution is intentional before publishing under your own account.public/css/main.csshas a mobile rule for.june-images, but the template uses.mona-images, so the mobile image sizing rule does not apply.- There are no automated tests configured.
package-lock.jsonwas generated by an older npm version and causes old-lockfile warnings during install.
Latest local checks:
npm cicompleted successfully.npm startserved the app.curl -I http://127.0.0.1:3000returnedHTTP/1.1 200 OK.- Secret scan found no obvious committed secrets; the only app hit was
process.env.PORT.
MIT. See LICENSE.