express-speed 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -66,7 +66,7 @@ This pattern works in line with Express middleware logic.
|
|
|
66
66
|
|
|
67
67
|
## Sub Path Routes
|
|
68
68
|
|
|
69
|
-
Use `get(path, handler)` to create different endpoints within the same pager.
|
|
69
|
+
Use `get(path, handler)` to create different endpoints within the same pager. Sub paths must be written as full paths.
|
|
70
70
|
|
|
71
71
|
```js
|
|
72
72
|
import { pager } from "express-speed";
|
|
@@ -78,11 +78,11 @@ export default pager
|
|
|
78
78
|
res.send("Blog Home");
|
|
79
79
|
})
|
|
80
80
|
|
|
81
|
-
.get("/post/:id", (req, res) => {
|
|
81
|
+
.get("/blog/post/:id", (req, res) => {
|
|
82
82
|
res.send(`Post ${req.params.id}`);
|
|
83
83
|
})
|
|
84
84
|
|
|
85
|
-
.get("/latest", (req, res) => {
|
|
85
|
+
.get("/blog/latest", (req, res) => {
|
|
86
86
|
res.send("Latest posts");
|
|
87
87
|
})
|
|
88
88
|
|