https://github.com/automattic/mydb
https://github.com/automattic/mydb
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/automattic/mydb
- Owner: Automattic
- Created: 2012-04-16T16:44:41.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2023-04-05T14:23:37.000Z (about 3 years ago)
- Last Synced: 2025-01-30T01:12:08.037Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 484 KB
- Stars: 151
- Watchers: 113
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: History.md
Awesome Lists containing this project
README
# This repository is no longer maintained
# mydb
MyDB realtime server.
## Example
```js
var http = require('http').Server();
var mydb = require('mydb')(http);
http.listen(3000);
```
That's all there's to it. Point your
[mydb-client](http://github.com/cloudup/mydb-client) to it, and
hook up MongoDB events through
[mydb-driver](http://github.com/cloudup/mydb-driver) or by setting
up [mydb-tail](http://github.com/cloudup/mydb-tail).
To expose documents with express that you can request with MyDB on the frontend, use [mydb-expose](https://github.com/cloudup/mydb-expose#example).
## API
### mydb(server)
Attaches the mydb server to a `http.Server`.
## Testing
In order to run the tests
* You can either:
* Start Redis: `redis-server`
* Start MongoDB: `mongod`
* Or:
* Go to test/
* `docker-compose up`
* Run the tests: `make test`
## License
MIT