Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nbbeeken/mdbjs
mdb.js
https://github.com/nbbeeken/mdbjs
Last synced: about 1 month ago
JSON representation
mdb.js
- Host: GitHub
- URL: https://github.com/nbbeeken/mdbjs
- Owner: nbbeeken
- Created: 2023-03-06T21:31:03.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-23T18:35:50.000Z (over 1 year ago)
- Last Synced: 2023-10-23T20:42:28.537Z (about 1 year ago)
- Language: TypeScript
- Size: 38.4 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# MongoDB Driver in the browser
Node driver with polyfills for compatibility in browserHow to run locally using mms and go backend:
* Start the backend
* Add package to mms/client (2 ways):
* (1) npm package (wip: package is not built)
* Run "npm i git+ssh://[email protected]:laurelxiang/mdbjs.git --save" in mms/client
* Make changes to backend such that this package is called instead of native node driver
(depending on the way your github is configured the path may be different)
* Replace instances of "import { MongoClient } from 'mongodb'" to "import { MongoClient } from 'mdbjs'"
(for now only in mms/client/js/project/metrics/services/dataExplorerService.ts)
* (2) npm link
* Fork and clone this repo on your local device
* Run "npm link" at the root of mdbjs
* Run "npm link mdbjs" at mms/client
* Run "npm run build" at the root of mdbjs
* Start mms (click [here](https://wiki.corp.mongodb.com/display/MMS/Cloud+Developer+Setup#CloudDeveloperSetup-BuildandruntheMMSapplication) for instructions)How to run tests locally:
* Fork and clone this repo on your local device
* Run "npm run test" at the root of mdbjs
* Add "-- --inspect-brk" to package.json\[scripts]\[test] to use chrome debugger for testsRunning npm run test will also build the package as well
Notes:
In test, the mongo client is imported from dist, so any updates to the repo will require a build before testing.