Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mhdfahz/nodejs-koa-oop-serverless-boilerplate

Koa REST API Oops Serverless Boilerplate
https://github.com/mhdfahz/nodejs-koa-oop-serverless-boilerplate

babel boilerplate eslint husky koa koa-router koa2 koajs serverless webpack

Last synced: 3 months ago
JSON representation

Koa REST API Oops Serverless Boilerplate

Awesome Lists containing this project

README

        




Koa REST API Oops Serverless Boilerplate



Boilerplate for Node.js Koa RESTful API application with Serverless, Cors, Error Handling, Logger, Request Log Time



## TECH STACK
![NODEJS](https://img.shields.io/badge/Node.js-43853D?style=for-the-badge&logo=node.js&logoColor=white)
![JEST](https://img.shields.io/badge/Jest-323330?style=for-the-badge&logo=Jest&logoColor=white)

![KOA-JS](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)
[![koa](https://img.shields.io/badge/koa-framework-blue.svg)](https://koajs.com/)

[![Serverless Lambda](https://img.shields.io/badge/Serverless-Lambda-orange.svg)](https://serverless.com/learn/quick-start/)
[![MVC Architecture](https://img.shields.io/badge/MVC-Architecture-lightgrey.svg)](https://en.wikipedia.org/wiki/Model–view–controller)

---

[![Jest](https://img.shields.io/badge/Jest-testing%20library-brightgreen.svg)](https://jestjs.io/)
[![SuperTest](https://img.shields.io/badge/SuperTest-HTTP%20assertions%20library-brightgreen.svg)](https://github.com/visionmedia/supertest)


**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
- A super small and optimized oops structure
- [Swagger](https://swagger.io/) API documentation
- Unit Test and Integration Test along with Test Coverage using [Jest](https://facebook.github.io/jest/) testing framework

---

## Getting Started

```zsh
$ git clone https://github.com/MHDFahz/NodeJS-Koa-OOP-Serverless-Boilerplate.git your-project-name
$ cd your-project-name
$ rm -rf .git && git init
```

```zsh
$ npm i
$ npm install
```

## Commands

### Run

```zsh
# Run normally
$ npm run devStart
```

## Test

All test for this boilerplate uses following tools.

- [Jest](https://github.com/facebook/jest)
- [supertest](https://github.com/visionmedia/supertest) - Easy HTTP assertions for integration test

#### Bug Reports & Feature Requests

Please use the [issue tracker](https://github.com/MHDFahz/NodeJS-Koa-OOP-Serverless-Boilerplate/issues) to report any bugs or ask feature requests.

## Self Promotion

Like this project? Please give it a ★ on [GitHub](https://github.com/MHDFahz)! It helps this project **a lot**.

## License

Provided under the terms of the [MIT License](https://github.com/MHDFahz/NodeJS-Koa-OOP-Serverless-Boilerplate/blob/master/LICENSE).

Copyright © 2023, [Muhammed Fahis]([email protected]).