JSPM

  • Created
  • Published
  • Downloads 63
  • Score
    100M100P100Q61095F
  • License MIT

Zod schemas + MongoDB

Package Exports

  • @bobosneefdev/zongodb
  • @bobosneefdev/zongodb/dist/index.js
  • @bobosneefdev/zongodb/dist/index.mjs

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@bobosneefdev/zongodb) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

ZongoDB

Zod schemas + MongoDB = <3

Install

npm install @bobosneefdev/zongodb

Config

Create and configure zongo_config.json in the root of your project. It's contents must be parsable by this Zod schema:

// Your config file must be parsable by this Zod schema.
z.object({
    MONGO_URI: z.string()
        .default("mongodb://localhost:27017"),
    BACKUP_DIR: z.string()
        .default("./ZongoDB/backups"),
    LOG_LEVEL: z.enum([
        "error",
        "warn",
        "info",
        "debug"
    ]),
});