dorante:从 JSON 模式存根 API

时间:2021-06-23 20:45:58
【文件属性】:
文件名称:dorante:从 JSON 模式存根 API
文件大小:150KB
文件格式:ZIP
更新时间:2021-06-23 20:45:58
JavaScript Dorante 接受 JSON 模式并提供基于它的存根 API 服务器。 安装 npm install dorante --save 用法 服务器 当你给它一个 JSON 模式时,Dorante 将启动一个存根 API 服务器。 然后,您可以向该服务器发出请求,Dorante 将尽最大努力使其表现得像模式所代表的 API 的真实版本。 var Dorante = require ( 'dorante' ) ; var get = require ( 'request' ) . get ; var dorante ; get ( 'https://api.example.com/schema' , function ( err , response , body ) { var schema = JSON . parse ( body ) ; dorante = new
【文件预览】:
dorante-master
----package.json(1KB)
----.travis.yml(38B)
----dist()
--------dorante.js(631KB)
----index.js(12KB)
----README.md(2KB)
----bower.json(426B)
----test()
--------server-test.js(7KB)
--------fixtures()
--------factory-test.js(8KB)

网友评论