rhiz:为模型构造函数原型自动生成 CRUD 路由

时间:2024-06-28 17:25:45
【文件属性】:

文件名称:rhiz:为模型构造函数原型自动生成 CRUD 路由

文件大小:7KB

文件格式:ZIP

更新时间:2024-06-28 17:25:45

JavaScript

弹珠 为模型构造函数自动生成 CRUD 路由 用 var hapi = require ( "hapi" ) ; var server = hapi . createServer ( ) ; server . connections ( { port : 8000 } ) ; server . route ( require ( "rhiz" ) ( Model , "articles" ) ) ; function Model ( ) { //create, findOne, update, delete methods... } /* this code will create the following routes: create: POST "/articles", read: GET "/articles/{id}", update:


【文件预览】:
rhiz-master
----.jshintrc(6KB)
----.gitignore(526B)
----package.json(1KB)
----LICENSE(1KB)
----index.js(57B)
----README.md(1KB)
----lib()
--------rhiz.js(2KB)
----test()
--------rhiz.test.js(3KB)

网友评论