0.0.24 • Published 9 years ago

nodeajax v0.0.24

Weekly downloads
2
License
MIT
Repository
-
Last release
9 years ago

nodeajax

Web 开发数据模拟环境,提供前端模拟 View 层解决方案。

参照 jQuery 设计 API,使用 JavaScript 编写AJAX模拟数据 使用 handlebars 编写后端模板引擎,提高前后端开发效率

  • 模拟 AJAX
  • 模拟后端开发环境中的 JSON + 模板渲染 HTML
  • 模拟 RESTfull 接口

安装

npm install nodeajax

轻松模拟数据

创建 app.js 文件,并写入如下内容

$.doc('# 数据交互文档')

$.ajax('/ajax/').done({
    status: "success",
    msg: "成功加入会员"
})

$.ajax('/array/').done(
    [
        1,
        2,
        3,
        4
    ]
    )

$.ajax('/function/').done(function (req, res) {
    res.json(req.query)
})

在命令行输入(推荐使用 nodemon

cd [切换至 app.js 所在的目录]
node app

成功运行后将根据代码自动生成的控制台

更多示例

nodeajax-examples

0.0.24

9 years ago

0.0.23

9 years ago

0.0.20

9 years ago

0.0.19

9 years ago

0.0.18

9 years ago

0.0.16

9 years ago

0.0.15

9 years ago

0.0.14

9 years ago

0.0.13

9 years ago

0.0.12

9 years ago

0.0.11

9 years ago

0.0.10

9 years ago

0.0.9

9 years ago

0.0.8

9 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago

0.0.0

10 years ago