cif / ts-start

Typescript Web Service Starting Point

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Typescript Node Service

This is a minimalist NodeJS web service starting point using Typescript.

In The Box

Typescript

Minimal configuration. Augment as necessary.

(Micro) Service

Node native http lib. No router. Single handler in src/app.ts, HTTP/1.1 server created in src/server.ts.

Development

Dockerized nodemon dev via npm run docker:dev so it works on everyone's machine.

Jest runner watches tests while running dev server.

Supertest in tests/app.test.ts makes HTTP calls to service.

VSCode debug configurations for Service and Tests (TODO: expose and bind to container ports vs local)

Build

Run npm docker:build Dockerized build image from node:10, final production image from alpine ~34MB

Run container locally via npm run docker:start

About

Typescript Web Service Starting Point


Languages

Language:TypeScript 52.1%Language:Dockerfile 29.1%Language:JavaScript 18.8%