• Stars
    star
    472
  • Rank 89,495 (Top 2 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 6 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

πŸ’― Boilerplate for Node.js Koa RESTful API application with Docker, Swagger, Jest, CodeCov and CircleCI
Koa REST API Boilerplate

Koa REST API Boilerplate

Boilerplate for Node.js Koa RESTful API application with Docker, Swagger, Jest, CodeCov, and Circle CI


Koa REST API Boilerplate is a highly opinionated boilerplate template for building RESTful API application with Koa.

This boilerplate include the following features:

  • Logging to STDOUT/STDERR stream using Pino
  • A super small and optimized Docker image based on Node.js Alpine image
  • Swagger API documentation based on JSDoc
  • Continuous integration and delivery using CircleCI
  • Unit Test and Integration Test along with Test Coverage using Jest testing framework

Getting Started

$ git clone https://github.com/posquit0/koa-rest-api-boilerplate your-project-name
$ cd your-project-name
$ rm -rf .git && git init
$ yarn
$ yarn start

Commands

Run

# Run normally
$ yarn start
# Run the application with nodemon for development
$ yarn dev

Test

# Test
$ yarn test                           # Run all test
$ yarn test:unit                      # Run only unit test
$ yarn test:integration               # Run only integration test
# Test (Watch Mode for development)
$ yarn test:watch                     # Run all test with watch mode
$ yarn test:watch:unit                # Run only unit test with watch mode
$ yarn test:watch:integration         # Run only integration test with watch mode
# Test Coverage
$ yarn test:coverage                  # Calculate the coverage of all test
$ yarn test:coverage:unit             # Calculate the coverage of unit test
$ yarn test:coverage:integration      # Calculate the coverage of integration test
# Test consistent coding style (Lint)
$ yarn lint                           # Lint all sourcecode
$ yarn lint:app                       # Lint app sourcecode
$ yarn lint:test                      # Lint test sourcecode

Archive

$ yarn pack

Test

All test for this boilerplate uses following tools.

Contributing

This project follows the Contributor Covenant Code of Conduct.

Bug Reports & Feature Requests

Please use the issue tracker to report any bugs or ask feature requests.

Self Promotion

Like this project? Please give it a β˜… on GitHub! It helps this project a lot. And if you're feeling especially charitable, follow posquit0 on GitHub.

See Also

  • koa-logging - A middleware that logs request and response with Pino.
  • koa-request-id - A middleware that generates a unique Request ID for every incoming HTTP request.
  • koa-http-client - A middleware that attachs HTTP client to communicate with the context during inter-service communications.

License

Provided under the terms of the MIT License.

Copyright Β© 2017-2019, Byungjin Park.

More Repositories

1

Awesome-CV

πŸ“„ Awesome CV is LaTeX template for your outstanding job application
TeX
20,127
star
2

hugo-awesome-identity

😀 Awesome Identity is a single-page Hugo theme to introduce yourself.
HTML
565
star
3

awesome-engineering-team-principles

😎 A curated list of awesome resources for engineering team principles
358
star
4

dotfiles

⚑ Awesome configurations for the development environments
Shell
173
star
5

awesome-kong

😎 A curated list of awesome resources for Kong API Gateway
93
star
6

awesome-engineering-ladders

😎 A curated list of awesome resources for Engineering Ladder
89
star
7

awesome-engineer-onboarding

😎 A curated list of awesome resources for engineer onboarding
77
star
8

node-iamporter

πŸš€ A REST API client for I'mport
JavaScript
62
star
9

Awesome-Web-CV

πŸ“ Single Page Web Application for Your Outstanding CV
JavaScript
56
star
10

brewfile

🍎 Brewfile to install softwares in macOS for engineers
Ruby
49
star
11

vimrc

πŸ“ Vim Configuration for nerds with vim-plug
Vim Script
39
star
12

zshrc

πŸ“ Zsh Configuration for nerds with zplug
Shell
35
star
13

tmux-conf

πŸ“ TMUX Configuration for nerds with tpm
31
star
14

node-identif

πŸ”‘ Helper class to verify one's identity via personal channels(SMS, Phone, E-Mail and more!)
JavaScript
28
star
15

node-giga

πŸ“¦ Easy streaming upload and download for File System, AWS S3
JavaScript
28
star
16

HackerRank

my solutions for hackerrank.com
C++
21
star
17

packer-templates

Packer Templates for AWS AMI and Vagrant Box
Shell
20
star
18

react-tutorial

Written for educating the modern web development to the students
JavaScript
18
star
19

ama

πŸ’­ Ask me anything!
16
star
20

therapi

πŸ€ Awesome API Documentation and Testing Application
JavaScript
13
star
21

node-apistore-sms

Client for SMS/LMS/MMS API in Korea
JavaScript
12
star
22

cv

🌟 Awesome CV on the Web
JavaScript
12
star
23

identity

😀 My personal identity website with Hugo & Awesome Identity
10
star
24

demo-terraform-provider-kong

:trollface: Demo for Terraform Provider Kong
HCL
9
star
25

dokuwiki-plugin-syntaxhighlightjs

Syntax Highlighter for DokuWiki with highlight.js
PHP
9
star
26

dockerfiles

A collection of useful Dockerfile
Dockerfile
8
star
27

gitconfig

πŸ“ Git configurations
8
star
28

tmux-d-day

Tmux plugin that displays the count of D-Day
Shell
8
star
29

node-kakao-alimtalk-bizmsg

API Client to send Kakao Alimtalk with BizMsg Provider
JavaScript
7
star
30

falcon-boilerplate

Boilerplate template for a Python Falcon application with Docker, PyTest, Coveralls, and Circle CI
Python
7
star
31

PosB-Slack-Bot

A bot to notify a latest articles from PosB to Slack channel
Python
7
star
32

i

Serve static files
6
star
33

Expluit0

Expluit0 is Library for Python. It is used to generate ShellCode, to test ShellCode or to get more things for Exploit.
Python
6
star
34

git-hooks

A Collection of useful Git Hook Scripts
Shell
6
star
35

koa-legit

πŸš₯ Koa middleware to validate and sanitize HTTP request
JavaScript
5
star
36

Expluit0-docs

Docs for Expluit0 Project
JavaScript
4
star
37

blog

πŸ”₯ Technical blog by Byungjin Park
4
star
38

omega

πŸ”₯Expressive framework to write serverless functions in Node.js
JavaScript
4
star
39

posquit0

I'm posquit0
3
star
40

.github

Template Repository for GitHub metadata
2
star
41

posquit0.github.io

test
JavaScript
2
star
42

wedding-comment

2
star
43

terraform-modules

Terraform Modules for Awesome DevOps Jobs
2
star
44

katacoda-scenarios

Katacoda Scenarios
1
star
45

k8s-manifests

Manageable Kubernetes manifests
1
star