![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
@e22m4u/js-repository-mongodb-adapter
Advanced tools
English | Русский
MongoDB adapter for @e22m4u/js-repository
npm install @e22m4u/js-repository-mongodb-adapter
All parameters are optional:
name | default value |
---|---|
protocol | 'mongodb' |
host | '127.0.0.1' |
port | 27017 |
database | 'database' |
username | undefined |
password | undefined |
Example:
import {Schema} from '@e22m4u/js-repository';
const schema = new Schema();
// define datasource
schema.defineDatasource({
name: 'myMongo', // datasource name
adapter: 'mongodb', // adapter name
// configuration
host: '127.0.0.1',
port: 27017,
database: 'myDatabase',
});
// define model
schema.defineModel({
name: 'user', // model name
datasource: 'myMongo', // datasource name (see above)
properties: { // model fields
name: 'string',
surname: 'string',
},
});
// get repository by model name and create a record
const userRep = schema.getRepository('user');
const user = await userRep.create({name: 'John', surname: 'Doe'});
console.log(user);
// {
// id: '64f3454e5e0893c13f9bf47e',
// name: 'John',
// surname: 'Doe',
// }
Start mongo:latest
container using setup.sh
script.
./setup.sh
Run tests
npm run test
MIT
FAQs
MongoDB adapter for @e22m4u/js-repository
We found that @e22m4u/js-repository-mongodb-adapter demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.