crud-api-express 1.1.6 → 1.1.7

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/readme.md +13 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crud-api-express",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "main": "dist/index.js",
package/readme.md CHANGED
@@ -151,6 +151,7 @@ Returns the Express Router instance configured with CRUD routes.
151
151
  { "method": "POST", "path": "/examples/custom-action", "params": null }
152
152
  ]
153
153
  ```
154
+
154
155
  ## ⚙️ Options
155
156
 
156
157
 
@@ -170,6 +171,18 @@ Returns the Express Router instance configured with CRUD routes.
170
171
 
171
172
  ---
172
173
 
174
+ ## 📖 Fetch All Records with Query Params (GET)
175
+
176
+ **🛠️ URL:**
177
+ `GET http://localhost:3000/api/examples?filter={"status":"Active"}&sort={"expiry_date":1}&page=1&limit=10`
178
+
179
+ ### 🔍 Query Params Explanation:
180
+ - **`filter`** → Filter results (e.g., `{ "status": "Active" }`).
181
+ - **`sort`** → Sort order (e.g., `{ "expiry_date": 1 }` for ascending).
182
+ - **`page`** → Pagination (e.g., `page=1`).
183
+ - **`limit`** → Number of results per page.
184
+
185
+
173
186
  ## 📜 License
174
187
 
175
188
  This project is licensed under the **ISC License**.