Socket
Socket
Sign inDemoInstall

koa-rtapi

Package Overview
Dependencies
119
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    koa-rtapi

koa api in rtworld company


Version published
Weekly downloads
8
increased by300%
Maintainers
1
Install size
6.71 MB
Created
Weekly downloads
 

Readme

Source

koa-rtapi

简介

填坑工具:一行命令启动一个服务器,如果你有个数据库,点一下还能生成一个系统(还TM的带文档)

  • 创建一个http服务器 (koa2)
  • 简化的基于文件的api路由
  • 集成了一些别人的东西
    • koa-bodyparser:支持ctx.request.body
    • koa2-cors: 支持跨域
    • koa-static:静态文件服务
    • request:支持发起请求
    • mysql:数据库驱动
  • 集成了一些自己写的工具
    • tkui(填坑UI)
    • 代码(前台/API/数据库/文档)生成工具
    • 代码在线编辑工具
  • power by 村长扫大街

初始化

如果安装了npx(windows的node默认安装)

npm init -y && npm i koa-rtapi && npx koa-rtapi-init && node index

如果没有npx(linux的node好像不默认安装)

npm init -y && npm i koa-rtapi && node node_modules/koa-rtapi/init_code && node index

纯净安装

npm init -y && npm i koa-rtapi && npx koa-rtapi-init -pure

更新

npm update koa-rtapi

启动

node index

文件说明

  • _coder/ 代码生成模板
  • api/ api文件
    • coder.api.js: 代码生成api
    • demo.api.js: 范例api
  • www/ 放静态文件
  • index.js 启动和配置

FAQs

Last updated on 22 Nov 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc