Skip to main content

TypeScript Basic Webserver

TypeScript Basic Webserver logo
TypeScript Basic Webserverv1.0.0

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.

Tools: dev-typescript
Install:dev-template typescript-basic-webserver
Maintainers: terchristerchris
GETTING STARTED

Prerequisites

Files

ENVIRONMENT

What gets set up

When you install this template, the following are configured for you:

In your devcontainer

Setup

npm install

Run the Express server

npm run dev

Server runs on port 3000 with hot reload via nodemon. VS Code auto-forwards the port.

ARCHITECTURE

Architecture

These diagrams are auto-generated from the template's metadata. Click any diagram to enlarge.

Deployment

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.PORT if set, otherwise 3000
  • Dev: npm run dev runs the server with nodemon so edits reload automatically.

HTTP API

PathMethodResponse
/GETPlain-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 PORT and startup logging stay consistent with the Dockerfile and manifests.