crud-api-express 1.2.1 → 1.2.3
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/package.json +1 -1
- package/readme.md +8 -10
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|

|
|
4
4
|

|
|
5
5
|

|
|
6
|
-

|
|
7
6
|

|
|
8
7
|

|
|
9
8
|

|
|
@@ -18,9 +17,8 @@ Install the package using npm:
|
|
|
18
17
|
```bash
|
|
19
18
|
npm install crud-api-express
|
|
20
19
|
```
|
|
21
|
-
|
|
22
20
|
This project provides a flexible and reusable CRUD (Create, Read, Update, Delete) API controller for MongoDB using Express.js and Mongoose.
|
|
23
|
-
|
|
21
|
+
|
|
24
22
|
|
|
25
23
|
## 📌 Table of Contents
|
|
26
24
|
|
|
@@ -29,19 +27,19 @@ This project provides a flexible and reusable CRUD (Create, Read, Update, Delete
|
|
|
29
27
|
- [Usage](#usage)
|
|
30
28
|
- [API](#api)
|
|
31
29
|
- [Options](#options)
|
|
32
|
-
- [Examples](#examples)
|
|
33
|
-
- [Contributing](#contributing)
|
|
34
30
|
- [License](#license)
|
|
35
31
|
|
|
32
|
+
|
|
33
|
+
|
|
36
34
|
---
|
|
37
35
|
|
|
38
|
-
##
|
|
36
|
+
## Introduction
|
|
39
37
|
|
|
40
38
|
The `CrudController` class simplifies the creation of RESTful APIs in Node.js applications using MongoDB. It abstracts away common CRUD operations, error handling, middleware integration, and supports custom routes and aggregation pipelines.
|
|
41
39
|
|
|
42
40
|
---
|
|
43
41
|
|
|
44
|
-
##
|
|
42
|
+
## Usage
|
|
45
43
|
|
|
46
44
|
Here's a basic example of how to use in Es module `CrudController`:
|
|
47
45
|
|
|
@@ -224,7 +222,7 @@ mongoose
|
|
|
224
222
|
|
|
225
223
|
---
|
|
226
224
|
|
|
227
|
-
##
|
|
225
|
+
## API
|
|
228
226
|
|
|
229
227
|
### `getRouter(): Router`
|
|
230
228
|
Returns the Express Router instance configured with CRUD routes.
|
|
@@ -243,7 +241,7 @@ Returns the Express Router instance configured with CRUD routes.
|
|
|
243
241
|
]
|
|
244
242
|
```
|
|
245
243
|
|
|
246
|
-
##
|
|
244
|
+
## Options
|
|
247
245
|
|
|
248
246
|
|
|
249
247
|
### `CrudOptions<T>`
|
|
@@ -274,7 +272,7 @@ Returns the Express Router instance configured with CRUD routes.
|
|
|
274
272
|
- **`limit`** → Number of results per page.
|
|
275
273
|
|
|
276
274
|
|
|
277
|
-
##
|
|
275
|
+
## License
|
|
278
276
|
|
|
279
277
|
This project is licensed under the **ISC License**.
|
|
280
278
|
|