objy-mapper-gridfs

0.0.5 • Public • Published

OBJY storage mapper for gridfs

Installing

npm install objy-mapper-gridfs

Example

Let's create an Object Family that uses the mapper:

const GridFSMapper = require('objy-mapper-gridfs');

// Define an object family
OBJY.define({
   name : "Object",
   pluralName: "Objects",
   storage: new GridFSMapper().connect('mongodb://localhost'),
})

// Use the object family's constructor
OBJY.Object({name: "Hello World"}).add(function(data)
{
   console.log(data);
})

License

This project itself is licensed under the MIT License - see the LICENSE.md file for details.

/objy-mapper-gridfs/

    Package Sidebar

    Install

    npm i objy-mapper-gridfs

    Weekly Downloads

    1

    Version

    0.0.5

    License

    MIT

    Unpacked Size

    13.6 kB

    Total Files

    4

    Last publish

    Collaborators

    • marcoboelling