@cloudnativegbb/cosmos-odm

    0.0.1-beta • Public • Published

    Cosmos DB SQL/Core API ODM

    This project is meant to be a simple ODM library for Cosmos DB via the SQL/"Core" API.

    Dependencies

    How to use:

    npm install --save raykao/cosmos-orm
    // models/user-model.js
    
    const Model = require('cosmos-odm');
    const settings = {name: "Users"};
    const User = new Model(settings);
    
    module.exports = User;
    // controllers/users-controller.js
    const User = require('../models/user-model');
    
    const index = async function(req, res, next) {
      try {
        const users = await User.findAll();
    
        res.send({
          users: users
        })
      }
      catch(e){
        next(e);
      }
    }

    Install

    npm i @cloudnativegbb/cosmos-odm

    DownloadsWeekly Downloads

    1

    Version

    0.0.1-beta

    License

    ISC

    Unpacked Size

    3.82 kB

    Total Files

    3

    Last publish

    Collaborators

    • raykao