json-server All In One
json-server All In One
https://github.com/typicode/json-server#getting-started
$ npm i -g json-server
# local
$ ./node_modules/json-server/lib/cli/bin.js  --watch ./mock/app.json
# global
$ json-server --watch ./mock/app.json

{
    "data": {
        "data": {
            "endtime": "2020-10-26",
            "starttime": "2020-10-20",
            "rows": [
                {
                    "id": 1,
                    "type": 1,
                    "game_id": 10043,
                    "is_read": true,
                    "time": 1603780400,
                    "notifier": 440
                },
                {
                    "id": 2,
                    "type": 1,
                    "game_id": 10043,
                    "is_read": false,
                    "time": 1603780500,
                    "notifier": 440
                },
                {
                    "id": 3,
                    "type": 1,
                    "game_id": 10043,
                    "is_read": false,
                    "time": 1603780500,
                    "notifier": 440
                },
                {
                    "id": 4,
                    "type": 1,
                    "game_id": 10043,
                    "is_read": false,
                    "time": 1603780500,
                    "notifier": 440
                },
                {
                    "id": 5,
                    "type": 1,
                    "game_id": 10043,
                    "is_read": false,
                    "time": 1603780500,
                    "notifier": 440
                },
                {
                    "id": 6,
                    "type": 1,
                    "game_id": 10043,
                    "is_read": false,
                    "time": 1603780500,
                    "notifier": 440
                },
                {
                    "id": 7,
                    "type": 1,
                    "game_id": 10043,
                    "is_read": false,
                    "time": 1603780500,
                    "notifier": 440
                },
                {
                    "id": 8,
                    "type": 1,
                    "game_id": 10043,
                    "is_read": false,
                    "time": 1603780500,
                    "notifier": 440
                }
            ],
            "title": "提醒"
        },
        "pagination": {
            "page": 1,
            "per_page": 20,
            "total": 200
        }
    }
}
refs
xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!
json-server All In One的更多相关文章
- json server服务器
		json文件可以理解为数据库 一.json-server快速搭建RESTAPI 安装: sudo cnpm install -g json-server 启动(使用): json-server指向js ... 
- json server的简单使用(附:使用nodejs快速搭建本地服务器)
		作为前端开发人员,经常需要模拟后台数据,我们称之为mock.通常的方式为自己搭建一个服务器,返回我们想要的数据.json server 作为工具,因为它足够简单,写少量数据,即可使用. 安装 首先需要 ... 
- json:server  本地搭建
		做个记录, 第一步,我们新建一个文件夹. 第二步,打开文件夹,执行git,没有git可以下载一个.或者用命令行工具进入到这个文件夹! 第三步,初始化json 在git里执行npm init --ye ... 
- 接口神器之 Json Server 详细指南
		简介 json-server 是一款小巧的接口模拟工具,一分钟内就能搭建一套 Restful 风格的 api,尤其适合前端接口测试使用. 只需指定一个 json 文件作为 api 的数据源即可,使用起 ... 
- 快速搭建REST API——json server
		一:全局安装json-server npm install json-server -g 二:在自己项目跟目录下存放mock/data.json,json内容如下: { "roles&quo ... 
- JSON 的含义?
		JSON 的全称是 JavaScript Object Notation,是一种轻量级的数据交换格式.JS ON 与 XML 具有相同的特性,例如易于人编写和阅读,易于机器生成和解析.但是 JSON ... 
- linux 使用sh@d0ws0cks server
		[root@linux-node1 ~]# cat /etc/shadowsocks.json { "server":"x.x.x.x", , "lo ... 
- 搭建Mock Server
		1.为什么要搭建mock-server? 为了更好的分工合作,让前端能在不依赖后端环境的情况下进行开发,其中一种手段就是为前端开发者提供一个 web 容器,这个本地环境就是 mock-server. ... 
- WebSocket起航 JavaScript客户端和Server通信
		Message =>JSON => Move 客户端发给服务器总是Move server.send(JSON.stringify({row: row, column: column} ... 
- 使用json通过telegraf生成metrics(摘自telegraf github文档)
		JSON: The JSON data format flattens JSON into metric fields. NOTE: Only numerical values are convert ... 
随机推荐
- 理解js闭包9大使用场景
			1.返回值(最常用) //1.返回值 最常用的 function fn(){ var name="hello"; return function(){ return name; } ... 
- jackson学习之四:WRAP_ROOT_VALUE(root对象)
			欢迎访问我的GitHub https://github.com/zq2599/blog_demos 内容:所有原创文章分类汇总及配套源码,涉及Java.Docker.Kubernetes.DevOPS ... 
- MySQL调优之索引优化
			一.索引基本知识 1.索引的优点 1.减少了服务器需要扫描的数据量 2.帮助服务器避免排序和临时表 例子: select * from emp orde by sal desc; 那么执行顺序: 所以 ... 
- 登陆的时候出现javax.xml.bind.DatatypeConverter错误
			错误详情: Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/Da ... 
- https://www.exploit-db.com/docs/english/45906-cors-attacks.pdf
			https://www.exploit-db.com/docs/english/45906-cors-attacks.pdf What is CORS (cross-origin resource s ... 
- __init__ raises an exception, then __del__ will still be called
			issue 808164: socket.close() doesn't play well with __del__ - Python tracker https://bugs.python.org ... 
- 隐性 URL 转发代码
			隐性转发的优势体现于无需跳转和变动浏览器地址栏,即可实现转发. <!DOCTYPE html> <html lang="zh-CN"> <head&g ... 
- 2021最新 Spring面试题精选(附刷题小程序)
			推荐使用小程序阅读 为了能让您更加方便的阅读 本文所有的面试题目均已整理至小程序<面试手册> 可以通过微信扫描(或长按)下图的二维码享受更好的阅读体验! 目录 推荐使用小程序阅读 1. S ... 
- P5858 Golden Swold
			写在前面 简单的单调队列优化 DP 处理略微有点恶心,于是乎,用来取 \(\max\) 的极小值直接开到了 long long 的最小极限,了 define int long long /cy 算法思 ... 
- 洛谷P2145
			Description 给定一串数字,每个数字代表一种颜色 你可以向这个数字序列里加任意数字,每加一个视为一次操作 当你加入的数字和与它相连的同种数字不少于三个时,他们就会消除 消除后序列的两端自动靠 ... 
