Giter Site home page Giter Site logo

rheehot / koa-rest-api-docs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ziwon/koa-rest-api-docs

0.0 1.0 0.0 1.15 MB

Koa RESTful API template to generate Redoc documentation and Swagger console

License: MIT License

HCL 0.75% Dockerfile 4.48% JavaScript 94.77%

koa-rest-api-docs's Introduction

Koa REST API Boilerplate

Koa REST API Docs


Koa REST API Docs is a fork of posquit0/koa-rest-api-boilerplate integrated with koa-joi-router-docs for generating Redoc API documentation and Swagger API console based on joi-router

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
  • Continuous integration and delivery using CircleCI
  • Unit Test and Integration Test along with Test Coverage using Jest testing framework
  • Generating Redoc API documentation and Swagger API console

Getting Started

$ git clone https://github.com/ziwon/koa-rest-api-docs 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.

API docs

Redoc

open http://localhost:7070/docs

Swagger Console

open http://localhost:7070/console

Contributing

Please contribute to this fork's awesome original repository.

Todo

  • Enable Redoc API console

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-2020, Byungjin Park, Yeongpil Yoon.

koa-rest-api-docs's People

Contributors

ziwon avatar dependabot[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.