JSON Server

Get a full fake REST API with zero coding in less than 30 seconds (seriously)
Created with <3 for front-end developers who need a quick back-end for prototyping and mocking.
- Egghead.io free video tutorial - Creating demo APIs with json-server
- JSONPlaceholder - Live running version
See also:
* :dog: husky - Git hooks made easy
* :hotel: hotel - developer tool with local .dev domain and https out of the box
* :atom_symbol: react-fake-props - generate fake props for your React tests (Jest, Enzyme, …)
* :heart: Patreon page - if you want to support JSON Server development
内容列表
- Sponsorship
- Example
- Install
- Routes
- Extras
- Static file server
- Alternative port
- Access from anywhere
- Remote schema
- Generate random data
- HTTPS
- Add custom routes
- Add middlewares
- CLI usage
- Module
- Simple example
- Custom routes example
- Access control example
- Custom output example
- Rewriter example
- Mounting JSON Server on another endpoint example
- API
- Deployment
- Links
- License
赞助
JSON服务器和我的其他项目的开发得到了人们的慷慨支持。如果你从我的项目中受益,并且愿意帮助他们保持经济上的可持续发展, 请访问 Patreon.
如果你是一家公司,你可以在这里有你的标志。
示例
创建一个 db.json

json-server是一款能够快速构建模拟RESTful API的工具,适用于前端开发者进行原型设计和mock数据。本文将深入探讨其核心功能,包括路由设置(复数、单数、过滤、分页、排序等),静态文件服务,自定义端口,远程模式,HTTPS支持,以及如何添加自定义路由和中间件。此外,还将介绍如何通过json-server生成随机数据和部署到生产环境。
最低0.47元/天 解锁文章
69

被折叠的 条评论
为什么被折叠?



