{"id":22821832,"url":"https://github.com/mohammadatikurrahman/portable-mongodb","last_synced_at":"2025-04-23T03:08:51.950Z","repository":{"id":260418208,"uuid":"881239605","full_name":"MohammadAtikurRahman/portable-mongodb","owner":"MohammadAtikurRahman","description":"Portable Mongodb is a fully portable MongoDB server for Node.js that runs without requiring separate MongoDB installation. This package includes all necessary binaries and data directories, making it easy to integrate a MongoDB server into your Node.js projects with minimal setup.","archived":false,"fork":false,"pushed_at":"2024-11-11T17:37:21.000Z","size":31,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-23T03:08:45.907Z","etag":null,"topics":["mongodb","mongodb-lite","portable-mongodb"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MohammadAtikurRahman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-31T07:07:30.000Z","updated_at":"2024-12-03T05:59:46.000Z","dependencies_parsed_at":"2024-11-03T21:16:57.512Z","dependency_job_id":null,"html_url":"https://github.com/MohammadAtikurRahman/portable-mongodb","commit_stats":null,"previous_names":["mohammadatikurrahman/mongo-lite-server","mohammadatikurrahman/portable-mongodb"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohammadAtikurRahman%2Fportable-mongodb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohammadAtikurRahman%2Fportable-mongodb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohammadAtikurRahman%2Fportable-mongodb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohammadAtikurRahman%2Fportable-mongodb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MohammadAtikurRahman","download_url":"https://codeload.github.com/MohammadAtikurRahman/portable-mongodb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250360489,"owners_count":21417721,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mongodb","mongodb-lite","portable-mongodb"],"created_at":"2024-12-12T16:09:06.773Z","updated_at":"2025-04-23T03:08:51.933Z","avatar_url":"https://github.com/MohammadAtikurRahman.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Portable Mongodb\n\n**Portable Mongodb** is a fully portable MongoDB server for Node.js that runs without requiring separate MongoDB installation. This package includes all necessary binaries and data directories, making it easy to integrate a MongoDB server into your Node.js projects with minimal setup.\n\n## Features\n\n- **No Installation Required**: Run MongoDB without needing to download and install it separately.\n- **Embedded MongoDB Server**: Integrated directly into your Node.js application.\n- **Portable**: Easily share and run projects across different environments.\n- **Data Persistence**: Maintain data between sessions without losing information.\n- **No Environment Setup Required**: No need to set up environment variables on Windows.\n\n## Compatibility and Supported Environments\n\n### Supported Environments\n\n| Operating System           |\n|----------------------------|\n| **Windows**                |\n\n### Not Supported Environments\n\n| Operating System                    |\n|-------------------------------------|\n| **MacOS (Intel)**                   |\n| **MacOS (Apple Silicon)**           |\n| **Linux** (all distributions, including Debian 11+) |\n| **Cloud-based Environments** (e.g., CodeSandbox, Repl.it) |\n\n## Installation\n\nInstall the package using npm:\n\n```bash\nnpm install portable-mongodb\n\n```\nNote: The installation of portable-mongodb may take approximately 4-7 minutes depending on your internet speed and system performance. This is due to the package size, as it includes essential MongoDB binaries to run an embedded MongoDB instance.\n\n## Required Packages\n\n\n```bash\nnpm install mongoose\n\n```\n\n\n```js\nconst portableMongo = require('portable-mongodb');\nconst mongoose = require('mongoose');\n\nasync function main() {\n  // Connect to the embedded MongoDB server with a specified database name\n  await portableMongo.connectToDatabase(\"portable-mongodb-database\");\n  console.log(\"Connected to the portable MongoDB database.\");\n\n  // Define a schema and model\n  const messageSchema = new mongoose.Schema({\n    message: String\n  });\n\n  const Message = mongoose.model(\"Message\", messageSchema);\n\n  // Insert a document with the message: \"allahu akbar\"\n  const newMessage = new Message({ message: \"Hello World\" });\n  await newMessage.save();\n\n  console.log(\"Message inserted:\", newMessage);\n\n  // Retrieve and print the document to confirm it was added\n  const messages = await Message.find();\n  console.log(\"Retrieved messages:\", messages);\n}\n\nmain().catch(console.error);\n\n```\n\n## Contributing\n\nContributions are welcome! If you find any issues or have feature requests, please feel free to open an issue or submit a pull request.\n\n## License\n\nThis project is licensed under the ISC License.\n\n## Author\n\nDeveloped by **Md. Atikur Rahman**.\n\n## Support\n\nFor any questions or support, you can reach out via [GitHub Issues](https://github.com/MohammadAtikurRahman/portable-mongodb/issues).\n\n---\n\nThank you for using **Portable Mongodb**! We hope it simplifies your development process.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohammadatikurrahman%2Fportable-mongodb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohammadatikurrahman%2Fportable-mongodb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohammadatikurrahman%2Fportable-mongodb/lists"}