1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | { "posts": [ { "id": 1, "title": "json-server", "author": "typicode" } ], "comments": [ { "id": 1, "body": "some comment", "postId": 1 } ], "profile": { "name": "typicode" } } |
1 | $ json-server --watch db.json |
1 | $ json-server --watch db.json --port 3004 |
1 | mkdir public echo 'hello world' > public/index.html json-server db.json |
1 | json-server db.json --static ./some-other-dir |
1 2 3 4 5 | { "/api/": "/", "/blog/:resource/:id/show": "/:resource/:id", "/blog/:category": "/posts/:id?category=:category" } |
1 | json-server db.json --routes routes.json |
1 2 3 4 | /api/posts # → /posts /api/posts/1 # → /posts/1 /blog/posts/1/show # → /posts/1 /blog/javascript # → /posts?category=javascript |
1 | <a href="https://github.com/typicode/json-server"><code>https://github.com/typicode/json-server</code></a> |
1 2 3 4 | { devtool: "#inline-source-map" } // => //# sourceMappingURL=.. |
1 2 3 4 5 | java -jar compiler.jar \ --js script.js \ --create_source_map ./script-min.js.map \ --source_map_format=V3 \ --js_output_file script-min.js |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |