All Projects → OXOYO → X Restful Api Generator Koa

OXOYO / X Restful Api Generator Koa

Licence: mit
一个基于 Koa 的 RESTful API 服务脚手架。 A RESTful API generator for Koa

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to X Restful Api Generator Koa

Codeigniter Jwt Sample
CodeIgniter JWT Sample
Stars: ✭ 144 (+700%)
Mutual labels:  restful-api, restful, jwt
Delphimvcframework
DMVCFramework (for short) is a popular and powerful framework for web solution in Delphi. Supports RESTful and JSON-RPC APIs development.
Stars: ✭ 761 (+4127.78%)
Mutual labels:  restful-api, restful, jsonwebtoken
Node Express Mongoose Passport Jwt Rest Api Auth
Node, express, mongoose, passport and JWT REST API authentication example
Stars: ✭ 146 (+711.11%)
Mutual labels:  restful-api, restful, jwt
Dashboard Server
A JSON file RESTful API with authorization based on json-server
Stars: ✭ 48 (+166.67%)
Mutual labels:  restful, jwt, jsonwebtoken
Koa2 Api Scaffold
一个基于Koa2的轻量级RESTful API Server脚手架。
Stars: ✭ 694 (+3755.56%)
Mutual labels:  restful-api, restful, koa
Apidoc
RESTful API 文档生成工具,支持 Go、Java、Swift、JavaScript、Rust、PHP、Python、Typescript、Kotlin 和 Ruby 等大部分语言。
Stars: ✭ 785 (+4261.11%)
Mutual labels:  restful-api, restful
Perfect Ssm
🍇更完善的Spring+SpringMVC+Mybatis+easyUI后台管理系统(RESTful API+redis)
Stars: ✭ 606 (+3266.67%)
Mutual labels:  restful-api, restful
Snake
🐍 一款小巧的基于Go构建的开发框架,可以快速构建API服务或者Web网站进行业务开发,遵循SOLID设计原则
Stars: ✭ 615 (+3316.67%)
Mutual labels:  restful, jwt
Jsonwebtoken
JWT lib in rust
Stars: ✭ 681 (+3683.33%)
Mutual labels:  jwt, jsonwebtoken
Koa Rest Api Boilerplate
💯 Boilerplate for Node.js Koa RESTful API application with Docker, Swagger, Jest, CodeCov and CircleCI
Stars: ✭ 420 (+2233.33%)
Mutual labels:  restful, koa
Rest Api Design Guide
NBB's REST-ish API Design Guide
Stars: ✭ 643 (+3472.22%)
Mutual labels:  restful-api, restful
Geek Framework
基于SpringBoot+Shiro+Redis+Jwt+Thymeleaf+MyBatis 开发的后台用户、角色、权限、会员管理、RestFul、Token和前台用户登录注册以及前后台用户分离的脚手架,技术交流请加QQ群:805442966
Stars: ✭ 804 (+4366.67%)
Mutual labels:  jwt, jsonwebtoken
Gin Boilerplate
The fastest way to deploy a restful api's with Gin Framework with a structured project that defaults to PostgreSQL database and JWT authentication middleware stored in Redis
Stars: ✭ 559 (+3005.56%)
Mutual labels:  restful-api, jwt
Restful Api Design References
RESTful API 设计参考文献列表,可帮助你更加彻底的了解REST风格的接口设计。
Stars: ✭ 4,830 (+26733.33%)
Mutual labels:  restful-api, restful
Cerberus
A demonstration of a completely stateless and RESTful token-based authorization system using JSON Web Tokens (JWT) and Spring Security.
Stars: ✭ 482 (+2577.78%)
Mutual labels:  restful-api, jwt
Django Graphql Jwt
JSON Web Token (JWT) authentication for Graphene Django
Stars: ✭ 649 (+3505.56%)
Mutual labels:  jwt, jsonwebtoken
Nodepress
😎 RESTful API service for Blog/CMS, powered by @nestjs
Stars: ✭ 829 (+4505.56%)
Mutual labels:  restful-api, restful
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 (+4005.56%)
Mutual labels:  koa, jwt
Spring Boot Jwt
JWT auth service using Spring Boot, Spring Security and MySQL
Stars: ✭ 795 (+4316.67%)
Mutual labels:  jwt, jsonwebtoken
Koa Vue Notes Api
🤓 This is a simple SPA built using Koa as the backend, Vue as the first frontend, and React as the second frontend. Features MySQL integration, user authentication, CRUD note actions, and async/await.
Stars: ✭ 342 (+1800%)
Mutual labels:  koa, jwt

X-RESTful-API-Generator-Koa

A RESTful API service generator by Koa.

Travis CI Status codecov.io node GitHub package version dependencies Status codebeat badge license Gitter

English | 简体中文

Start

  # clone
  git clone

  # install dependencies
  npm i

  # import the src/x-restful-api-generator-koa.sql into the database.

  # start serve with hot reload
  npm run dev

Node.js >= 7.6.0 required.

Develop Step

1.Edit config.js

2.Export the database to schema by sequelize-auto

  npm -g install mysql
  sequelize-auto -o "./src/schema" -d x-restful-api-generator-koa -h localhost -u root -p 3306 -e mysql

3.Create module directories and files

  apps
    \_ newModules
        Ctrl.js
        Model.js
        Routers.js

Build

  npm run build

production

  pm2 start ecosystem.config.js --name x-restful-api-generator-koa --env production

Demo

To run the demo, you need to import the ./src/x-restful-api-generator-koa.sql into Mysql

demoModule_001

URL: http://localhost:3000/x-restful-api-generator-koa/demoModule_001/login

Resonse:

  {
    "code": 200,
    "msg": "登录成功!",
    "data": {
      "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyTmFtZSI6InRlc3QiLCJwYXNzd29yZCI6IjEyMzQ1NiIsImlhdCI6MTUwODkyMTY2OSwiZXhwIjoxNTA5MDA4MDY5fQ.2occtME3kLUDxntJXOz5e1dkspybGIVqbDPRgaE6lZA"
    }
  }

URL: http://localhost:3000/x-restful-api-generator-koa/demoModule_001/list

Response:

  {
    "code": 200,
    "msg": "查询列表成功!",
    "data": {
      "count": 300,
      "list": []
    }
  }

URL: http://localhost:3000/x-restful-api-generator-koa/demoModule_001/verify/list

Response:

  {
    "code": 9999,
    "msg": "token无效!请重新登录!",
    "data": {}
  }

Articles

URL: http://localhost:3000/x-restful-api-generator-koa/articles/add

Request Body:

  {
    title: 'myArticle_001'
    content: 'yyyyyyyyyyyyyyyyyyyyyyy'
  }

Response:

  {
    "code": 200,
    "msg": "添加文章成功!",
    "data": {
      "id": 3,
      "title": "myArticle_001",
      "content": "yyyyyyyyyyyyyyyyyyyyyyy",
      "updatedAt": "2017-10-27T07:52:21.745Z",
      "createdAt": "2017-10-27T07:52:21.745Z"
    }
  }

URL: http://localhost:3000/x-restful-api-generator-koa/articles/update

Request Body:

  {
    id: '3'
    content: 'xxxxxx'
  }

Response:

  {
    "code": 200,
    "msg": "编辑文章成功!",
    "data": {
      "id": 3,
      "title": "myArticle_003",
      "content": "xxxxxx",
      "createdAt": "2017-10-26T23:52:21.000Z",
      "updatedAt": "2017-10-27T00:08:55.000Z"
    }
  }

URL: http://localhost:3000/x-restful-api-generator-koa/articles/remove

Request Body:

  {
    id: '2'
  }

Response:

  {
    "code": 200,
    "msg": "删除文章成功!",
    "data": 1
  }

URL: http://localhost:3000/x-restful-api-generator-koa/articles/list?pageSize=1&currentPage=1

Response:

  {
    "code": 200,
    "msg": "查询账号列表成功!",
    "data": {
      "count": 2,
      "list": [
        {
          "id": 1,
          "title": "myArticle_001",
          "content": "yyyyyyyyyyyyyyyyyyyyyyy",
          "createdAt": "2017-10-26T23:46:10.000Z",
          "updatedAt": "2017-10-26T23:46:10.000Z"
        }
      ]
    }
  }

File Upload

URL: http://localhost:63342/X-RESTful-API-Generator-Koa/src/apps/Files/upload.html

Response:

  {
    "status": 200,
    "msg": "上传成功!",
    "data": {
      "file": {
        "fieldname": "file",
        "originalname": "app.png",
        "encoding": "7bit",
        "mimetype": "image/png",
        "destination": "E:\\Webstorm_WorkSpace\\X-RESTful-API-Generator-Koa\\assets\\uploads",
        "filename": "1510817484098.png",
        "path": "E:\\Webstorm_WorkSpace\\X-RESTful-API-Generator-Koa\\assets\\uploads\\1510817484098.png",
        "size": 958
      },
      "filename": "1510817484098.png",
      "url": "//localhost:3000/assets/uploads/1510817484098.png"
    }
  }

TODO

  1.error handler middleware

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].