koa-mongo-rest:Koa 的 Rest API 生成

时间:2021-06-02 18:31:08
【文件属性】:
文件名称:koa-mongo-rest:Koa 的 Rest API 生成
文件大小:23KB
文件格式:ZIP
更新时间:2021-06-02 18:31:08
JavaScript Koa mongo REST 用于服务器的简单 REST api 安装 使用 npm 安装: npm install koa-mongo-rest 用法 需要库 generateApi = require ( 'koa-mongo-rest' ) ; 创建猫鼬模型 mongoUrl = '127.0.0.1:27017' ; mongoose = require ( 'mongoose' ) ; mongoose . connect ( mongoUrl ) ; schema = new mongoose . Schema ( { email : String , name : String , password : String , address : String , zipcode : Number , lists : Array } ) ; mod
【文件预览】:
koa-mongo-rest-master
----lib()
--------model.js(1B)
--------routes.js(801B)
--------actions.js(2KB)
--------index.js(349B)
----.travis.yml(60B)
----example()
--------coffee()
--------app.js(475B)
----gulpfile.js(65B)
----test()
--------server.js(453B)
--------index.coffee(3KB)
--------mocha.opts(94B)
----README.md(2KB)
----Makefile(681B)
----docs()
--------coverage.html(25KB)
--------tail.html(17B)
--------head.html(1KB)
--------docs.md(3KB)
--------test.html(5KB)
----.gitignore(44B)
----gulpfile.coffee(644B)
----package.json(1KB)

网友评论