TypeScript Basic Webserver
Express.js server with TypeScript, health endpoint, and Docker support
A minimal Express.js web server written in TypeScript with hot reload via nodemon. Includes Docker containerization, Kubernetes deployment manifests, and GitHub Actions CI/CD workflow.
terchrisPrerequisites
Files
Files (12)
├── .dockerignore ├── .gitignore ├── Dockerfile ├── package-lock.json ├── package.json ├── README-typescript-basic-webserver.md ├── template-info.yaml ├── tsconfig.json ├── .github/ │ └── workflows/ │ └── urbalurba-build-and-push.yaml ├── app/ │ └── index.ts └── manifests/ ├── deployment.yaml └── kustomization.yaml
Related templates
①What gets set up
When you install this template, the following are configured for you:
- Adds TypeScript and development tools (Node.js already in devcontainer)
②Setup
npm install③Run the Express server
npm run devServer runs on port 3000 with hot reload via nodemon. VS Code auto-forwards the port.
Architecture
These diagrams are auto-generated from the template's metadata. Click any diagram to enlarge.
Deployment
Components
Template README
The TypeScript Basic Webserver template is a simple hello world app that just display "Hello world" on a web page. The purpose of this simple app is to verify that the development environment is set up and ready. Se more documentation at http://localhost:3000/docs/templates/basic-web-server/typescript-basic-webserver
Entry point
- File:
app/index.ts - Port:
process.env.PORTif set, otherwise 3000 - Dev:
npm run devruns the server with nodemon so edits reload automatically.
HTTP API
| Path | Method | Response |
|---|---|---|
/ | GET | Plain-text greeting including the template name and the current time (UK locale format) |
There is no JSON API or /health route in the default app; add routes in app/index.ts as needed.
Changing the app
- Import additional Express middleware or routers in
app/index.ts. - Keep the listen call at the bottom so
PORTand startup logging stay consistent with the Dockerfile and manifests.