koa-ts-cli icon indicating copy to clipboard operation
koa-ts-cli copied to clipboard

koa-ts-cli

A simple CLI for create koa + ts project: koats create myProject.

Templates

koats provide three templates that are all based on ts.

This three template has the following three common features.

✓ koa v2

✓ Typescript

✓ Jest

✓ APIDOC

✓ Docker

✓ Eslint

✓ Husky

Installation

 npm i -g koa-ts-cli

Create Project

 koats create myProject
 # Choose your favorite template.
 
 cd myProject
 npm install

In Development Mode

 cd myProject
 npm run dev

NOTE: If you choose koa-ts-full-template or koa-ts-full-stack-template, you need to do some configuration.

In Porduction Mode

 npm run build
 cd myProject/dist
 npm run prod

NOTE: If you choose koa-ts-full-template or koa-ts-full-stack-template, you need to do some configuration.

Run In Docker

 cd myProject
 npm install
 npm run build
 sudo docker build -t koa-ts-api-server .
 sudo docker run -it --name koa-ts-api-server -p 8080:8080 koa-ts-api-server

Test

 cd myProject
 npm run test