@kikiutils/mongoose 1.0.0-rc.3 → 1.0.0
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 +43 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -41,7 +41,49 @@ npm i @kikiutils/mongoose
|
|
|
41
41
|
- Mongoose v8
|
|
42
42
|
- NodeJS 18 or higher
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
## Usage
|
|
45
|
+
|
|
46
|
+
Example code is provided in the examples folder. Follow the steps below to understand how to use the package:
|
|
47
|
+
|
|
48
|
+
1. Navigate to the examples folder
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
cd examples
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
2. Install the dependencies
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
pnpm i
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
3. Copy the .env.example file to .env
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
cp .env.example .env
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
4. Set the MONGODB_URI in the .env file with your MongoDB connection string.
|
|
67
|
+
5. Run the example code
|
|
68
|
+
|
|
69
|
+
- If you use bun, run this command directly
|
|
70
|
+
```bash
|
|
71
|
+
bun --watch run ./src/index.ts
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
- Use node
|
|
75
|
+
```bash
|
|
76
|
+
pnpm run build
|
|
77
|
+
MONGODB_URI="mongodb://127.0.0.1:27017/kikiutils-mongoose-test?directConnection=true" node ./dist/index.mjs
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
This will execute the example code and demonstrate how to use the @kikiutils/mongoose package with your MongoDB setup.
|
|
81
|
+
|
|
82
|
+
You can modify the code in examples/src/index.ts and run it to test other functions.
|
|
83
|
+
|
|
84
|
+
## License
|
|
85
|
+
|
|
86
|
+
[MIT License](./LICENSE)
|
|
45
87
|
|
|
46
88
|
<!-- Badges -->
|
|
47
89
|
[npm-version-src]: https://img.shields.io/npm/v/@kikiutils/mongoose/latest.svg?style=flat&colorA=18181B&colorB=28CF8D
|