amir-arad / typescript-service-template

template for typescript dockerised service

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Template typescript service

A typescript service that works with docker and shit

Developer instructions

Cloning this template

duplicate this repo replace typescript-service-template with the name of the service you want to create

Installing workspace

to install a development environment, you need to have nvm and git installd. Then, git clone this repo locally. copy .env.sample into .env so that you have an initial configuration. run:

$ nvm use
$ npm install
$ npm test

and that's it, you've just installed the development environment!

This project is written with VSCode in mind. specifically configured for these extensions: dbaeumer.vscode-eslint, esbenp.prettier-vscode.

test

npm run test

runst code checks and then execute internal tests.

npm run test:quick

only executes internal tests.

npm run test:quick -- --watch

run tests in watch mode.

clean

npm run clean

Removes any built code and any built executables.

build

npm run build

Cleans, then builds the service and docker image.

Your built code will be in the ./dist/ directory, the docker image will be written to the local docker exporter.

End-to-end Testing

npm run test:e2e

runs end-to-end tests against a built docker image (you need to run npm run build beforehand, though).

About

template for typescript dockerised service


Languages

Language:TypeScript 78.3%Language:Dockerfile 12.7%Language:JavaScript 9.0%