jerrywdlee / koa-typescript-boilerplate

Boilerplate for using koa2 in typescript 2.9

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

koa-typescript-boilerplate

Minimalistic boilerplate to jump-start a Koa2 project in TypeScript [v2.9].

Provides a basic template, "batteries included":

Quick start

This project is intended to be used with v8 (LTS Carbon) release of Node.js or newer and NPM. Make sure you have those installed.

Download

$ git clone https://github.com/jerrywdlee/koa-typescript-boilerplate.git

Install

$ cd koa-typescript-boilerplate
$ npm i

Run dummy application

$ npm run watch

Now start adding your code in the src and unit tests in the __tests__ directories. Have fun and build amazing things 🚀

Unit tests in JavaScript

Writing unit tests in TypeScript can sometimes be troublesome and confusing. Especially when mocking dependencies and using spies.

Available scripts

  • clean - remove coverage data, Jest cache and transpiled files,
  • dev - run app.ts directly by ts-node,
  • ts || repl - run typescrip REPL for node.js,
  • build - transpile TypeScript to ES6,
  • watch - watch change from /src, lint, build and restart app,
  • lint - lint source files and tests,
  • test - run tests,
  • test:watch - interactive watch mode to automatically re-run tests

Thanks

This project is Powered By node-typescript-boilerplate

About

Boilerplate for using koa2 in typescript 2.9

License:Apache License 2.0


Languages

Language:TypeScript 83.6%Language:JavaScript 16.4%