anchovycation / metronom

Easy to use Redis ORM based on node-redis with TypeScript support
https://anchovycation.github.io/metronom/
GNU General Public License v3.0
7 stars 3 forks source link

metronom object added #49

Closed saracalihan closed 1 year ago

saracalihan commented 2 years ago
    import { Metronom /* , Model*/ } from 'metronom';
    const metronom = new Metronom({
      url: "redis://localhost:6380",
    });
    const userModel = metronom.define({}, "users", { flexSchema: true });
    let user = await userModel.create({ name: "joe" });
    // ...

Now, you can pass RedisClientOptions to one object and create a lot model from it.