@kedaruma/revlm-server 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 +36 -0
- package/package.json +33 -0
package/README.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# @kedaruma/revlm-server
|
|
2
|
+
|
|
3
|
+
English documentation | [日本語ドキュメントはこちら](README-ja.md)
|
|
4
|
+
|
|
5
|
+
Self-hosted HTTP gateway that reproduces the MongoDB Realm App Services experience. It handles user authentication (password + provisional login) and proxied CRUD operations against MongoDB.
|
|
6
|
+
|
|
7
|
+
## Getting Started
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pnpm install
|
|
11
|
+
pnpm run build
|
|
12
|
+
pnpm start # runs dist/start.js
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Set the following environment variables or values in a `.env` file before starting:
|
|
16
|
+
|
|
17
|
+
- `MONGO_URI` / `mongoUri`
|
|
18
|
+
- `USERS_DB_NAME` / `usersDbName`
|
|
19
|
+
- `USERS_COLLECTION_NAME` / `usersCollectionName`
|
|
20
|
+
- `JWT_SECRET` / `jwtSecret`
|
|
21
|
+
- Optional provisional auth settings (`provisionalLoginEnabled`, `provisionalAuthId`, etc.)
|
|
22
|
+
|
|
23
|
+
## Scripts
|
|
24
|
+
|
|
25
|
+
- `pnpm run build` – compile `src` to `dist`
|
|
26
|
+
- `pnpm test` – run the Jest suites (uses MongoMemoryServer)
|
|
27
|
+
- `pnpm run clean` – remove `dist` and local dependencies
|
|
28
|
+
|
|
29
|
+
## Publishing
|
|
30
|
+
|
|
31
|
+
Build the package and create a tarball before releasing:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
pnpm run build
|
|
35
|
+
pnpm pack
|
|
36
|
+
```
|
package/package.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@kedaruma/revlm-server",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "Self-hosted replacement for MongoDB Realm App Services that brokers auth and MongoDB calls.",
|
|
6
|
+
"main": "dist/server.js",
|
|
7
|
+
"types": "dist/server.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist/"
|
|
10
|
+
],
|
|
11
|
+
"license": "ISC",
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"access": "public"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"bson": "^6.10.4",
|
|
17
|
+
"dotenv": "^17.2.3",
|
|
18
|
+
"express": "^5.1.0",
|
|
19
|
+
"mongodb": "^6.20.0",
|
|
20
|
+
"jsonwebtoken": "^9.0.2",
|
|
21
|
+
"bcrypt": "^6.0.0",
|
|
22
|
+
"@kedaruma/revlm-shared": "1.0.0"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"mongodb-memory-server": "^8.12.2"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"start": "node dist/start.js",
|
|
29
|
+
"build": "tsc -p tsconfig.json",
|
|
30
|
+
"clean": "rm -rf dist node_modules kedaruma-revlm-server-*.tgz",
|
|
31
|
+
"test": "pnpm exec jest --config ../../jest.config.cjs packages/revlm-server/src/__tests__/ --runInBand --watchman=false --verbose"
|
|
32
|
+
}
|
|
33
|
+
}
|