All Projects → SystangoTechnologies → Koach Javascript

SystangoTechnologies / Koach Javascript

Licence: mit
Production ready Koa2 boilerplate.

Programming Languages

javascript
184084 projects - #8 most used programming language
es2017
19 projects

Projects that are alternatives of or similar to Koach Javascript

Koajs Design Note
《Koa.js 设计模式-学习笔记》已完结 😆
Stars: ✭ 520 (+558.23%)
Mutual labels:  koa, koa2, koajs
Cool Admin Api
cool-admin-api 是基于egg.js、typeorm、jwt等封装的api开发脚手架、快速开发api接口
Stars: ✭ 188 (+137.97%)
Mutual labels:  koa, koa2, koajs
Vue Chat
👥Vue全家桶+Socket.io+Express/Koa2打造一个智能聊天室。
Stars: ✭ 887 (+1022.78%)
Mutual labels:  koa, koa2, koajs
restria
Entria's REST API boilerplate
Stars: ✭ 25 (-68.35%)
Mutual labels:  koa, koajs, koa2
Koahub
KoaHub.js -- 中文最佳实践Node.js Web快速开发框架。支持Koa.js, Express.js中间件。当前项目已停止维护,推荐使用Doodoo.js
Stars: ✭ 308 (+289.87%)
Mutual labels:  koa, koa2, koajs
polix
🚀 Node.js Web Framework
Stars: ✭ 32 (-59.49%)
Mutual labels:  koa, koajs, koa2
koahub-cli
KoaHub CLI -- KoaHub.js的开发工具,自动babel编译 ES6/7(Generator Function, Class, Async & Await)并且文件修改后自动重启。
Stars: ✭ 16 (-79.75%)
Mutual labels:  koa, koajs, koa2
Koa2 Note
《Koa2进阶学习笔记》已完结🎄🎄🎄
Stars: ✭ 4,725 (+5881.01%)
Mutual labels:  koa, koa2, koajs
Koahub Demo
koahub+async/await+mysql
Stars: ✭ 15 (-81.01%)
Mutual labels:  koa, koa2, koajs
Doodoo.js
Doodoo.js -- 中文最佳实践Node.js Web快速开发框架,支持Koa.js, Express.js中间件。
Stars: ✭ 57 (-27.85%)
Mutual labels:  koa, koajs
Node Typescript Koa Rest
REST API boilerplate using NodeJS and KOA2, typescript. Logging and JWT as middlewares. TypeORM with class-validator, SQL CRUD. Docker included. Swagger docs, actions CI and valuable README
Stars: ✭ 739 (+835.44%)
Mutual labels:  koa, koa2
Nodejs Koa Blog
基于 Node.js Koa2 实战开发的一套完整的博客项目网站
Stars: ✭ 1,162 (+1370.89%)
Mutual labels:  koa, koa2
Koatty
Koa2 + Typescript = Koatty. Use Typescript's decorator implement IOC and AOP.
Stars: ✭ 67 (-15.19%)
Mutual labels:  koa, koa2
Vue Koa Demo
🔰A simple full stack demo(CSR & SSR & Docker Support) written by Vue2 & Koa2(Koa1 verson also completed)
Stars: ✭ 730 (+824.05%)
Mutual labels:  koa, koa2
Koa Passport
Passport middleware for Koa
Stars: ✭ 748 (+846.84%)
Mutual labels:  koa, koa2
Koa2 Api Scaffold
一个基于Koa2的轻量级RESTful API Server脚手架。
Stars: ✭ 694 (+778.48%)
Mutual labels:  koa, koa2
Nodeclub Koa
use koa to rewrite nodeclub
Stars: ✭ 18 (-77.22%)
Mutual labels:  koa, koa2
Koa Helmet
Important security headers for koa
Stars: ✭ 595 (+653.16%)
Mutual labels:  koa, koa2
Koa Weixin Jssdk
koa weixin jssdk middleware
Stars: ✭ 7 (-91.14%)
Mutual labels:  koa, koa2
Trafficlight
🚦 Flexible NodeJS Routing Decorators for API Routing
Stars: ✭ 69 (-12.66%)
Mutual labels:  koa, koa2

KOACH

KOACH

Production ready boilerplate for building APIs with koa2 using mongodb as the database and http/2 as the communication protocol.

Description

This project covers basic necessities of most APIs.

  • Authentication (passport & jwt)
  • Database (mongoose)
  • Testing (mocha)
  • http/2 support for websites and apis
  • Doc generation with apidoc
  • linting using standard
  • Contains two versions of API

Please note, if you are planning to use this boilerplate for creating a web application then the 'https' protocol should be used to access its pages.

Visit https://localhost:3000/ to access the root page.

Requirements

  • node = v10.15.3
  • MongoDB

.env Configuration

To simulate environment variables in Dev environment, please create .env file at the root location and define the following properties -

NODE_ENV=production                                 // Node environment development/production
PORT=8000                                           // Server Port
SESSION=0.0.0.0                                     // secret-boilerplate-token
JWT_SECRET=This_Should_be_32_characters_long        // Jwt secret
DATABASE_URL=mongodb://localhost:27017/koach-dev    // Mongo database url
#DATABASE_URL=mongodb://mongodb:27017/koach-dev     // Mongo database url while using docker
DB_PATH=/home/ulap28/work/systango-frameworks       // path where database volumen mounted.

## Installation
```bash
git clone https://github.com/SystangoTechnologies/Koach.git

Features

Structure

├── bin
│   └── server.js            # Bootstrapping and entry point
├── cert
│   ├── server.cert          # SSL certificate
│   └── server.key           # SSL certificate key
├── config                   # Server configuration settings
│   ├── env                  # Environment specific config
│   │   ├── common.js
│   │   ├── development.js
│   │   ├── production.js
│   │   └── test.js
│   ├── index.js             # Config entrypoint
│   └── passport.js          # Passportjs config of strategies
├── src                      # Source code
│   ├── modules              # Module-specific controllers
│   │    ├── common          # Contains common modules
│   │    │   ├─── home              
│   │    │   └─ index.js
│   │    ├── v1              # Version 1 of APIs
│   │    │   ├─ Auth
│   │    │   ├─ User   
│   │    │   └─ index.js            
│   │    └─── v2             # Version 2 of APIs
│   │         ├─ Auth
│   │         ├─ User   
│   │         └─ index.js
│   ├── models               # Mongoose models
|   ├── requestModel
|   |    ├── v1
|   |    |  ├── auth.js
|   |    |  └── users.js
|   |    └── v2
|   |       ├── auth.js
|   |       └── users.js
|   ├── responseModel
|   |    ├── v1
|   |    |  ├── auth.js
|   |    |  └── users.js
|   |    └── v2
|   |       ├── auth.js
|   |       └── users.js
│   └── middleware           # Custom middleware
│       └── validators       # Validation middleware
└── test                     # Unit tests
└── pm2.config.js            # PM2 configuration file
└── Dockerfile               # Docker file
└── docker-compose.yml       # Docker Compose file

Usage

  • npm start Start server on development mode with Nodemon
  • npm run prod Start server on production mode with PM2
  • npm run docs Generate API documentation
  • npm test Run mocha tests

Running the server in Docker Container

Prerequisite For Docker Configuration : Docker and docker compose must be installed on the system.

Steps to run app in docker container :

  1. CD to project dir
  2. Create build using cmd: $ docker-compose build
  3. Start the server in daemon thread using cmd: $ docker-compose up -d
  4. Stop the server using cmd : $ docker-compose down

Documentation

API documentation is written inline and generated by apidoc.

Visit https://localhost:3000/docs/ to view docs

To view swagger API documentation

Visit https://localhost:3000/swagger to view Swagger UI.

Performance Comparison

The environment for the test cases are following-

  • Node Version: 8.9.4
  • Number of Users: 1500
  • Ramp-up Period: 300 seconds
  • Loop Count: 100

Average Throughput

Contributors

Arpit Khandelwal Anurag Vikram Singh Vikas Patidar Sparsh Pipley

License

MIT.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].