How to use webiny-entity-mongodb - 6 common examples

To help you get started, we’ve selected a few webiny-entity-mongodb examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github webiny / webiny-js / packages / demo-service-config / src / index.js View on Github external
export default async () => {
    database = await init();

    return {
        apollo: {
            introspection: true,
            playground: true
        },
        database: {
            mongodb: database
        },
        entity: {
            // Instantiate entity driver with DB connection
            driver: new MongoDbDriver({ database }),
            crud: {
                logs: true,
                read: {
                    maxPerPage: 1000
                },
                delete: {
                    soft: true
                }
            }
        },
        security: {
            enabled: false,
            token: {
                secret: process.env.WEBINY_JWT_SECRET,
                expiresOn: () => addDays(new Date(), 30)
            }
github webiny / webiny-js / packages / demo-service-config / src / development.js View on Github external
export default async (context: Object) => {
    database = await init();

    return {
        apollo: {
            introspection: context.devMode === true,
            playground: context.devMode === true
        },
        database: {
            mongodb: database
        },
        entity: {
            // Instantiate entity driver with DB connection
            driver: new MongoDbDriver({ database }),
            crud: {
                logs: true,
                read: {
                    maxPerPage: 1000
                },
                delete: {
                    soft: true
                }
            }
        },
        security: {
            enabled: true,
            token: {
                secret: process.env.WEBINY_JWT_SECRET,
                expiresOn: () => addDays(new Date(), 30)
            }
github webiny / webiny-js / packages / demo-api / src / configs / development.js View on Github external
export default async () => {
    database = await init();

    return {
        database: {
            mongodb: database
        },
        entity: {
            // Instantiate entity driver with DB connection
            driver: new MongoDbDriver({ database }),
            crud: {
                logs: true,
                read: {
                    maxPerPage: 1000
                },
                delete: {
                    soft: true
                }
            }
        },
        security: {
            enabled: true,
            token: {
                secret: process.env.WEBINY_JWT_SECRET,
                expiresOn: () => addDays(new Date(), 30)
            }
github webiny / webiny-js / packages / webiny-cli / src / init / template / packages / api / src / configs / development.js View on Github external
export default async () => {
    database = await init();

    return {
        database: {
            mongodb: database
        },
        entity: {
            // Instantiate entity driver with DB connection
            driver: new MongoDbDriver({ database }),
            crud: {
                logs: true,
                read: {
                    maxPerPage: 1000
                },
                delete: {
                    soft: true
                }
            }
        },
        security: {
            enabled: true,
            token: {
                secret: process.env.WEBINY_JWT_SECRET,
                expiresOn: () => addDays(new Date(), 30)
            }
github webiny / webiny-js / packages / webiny-cli / src / init / template / packages / api / src / configs / production.js View on Github external
export default async (context: Object) => {
    return {
        apollo: {
            introspection: context.devMode === true,
            playground: context.devMode === true
        },
        database: {
            mongodb: context.database
        },
        entity: {
            // Instantiate entity driver with DB connection
            driver: new MongoDbDriver({ database: context.database }),
            crud: {
                logs: true,
                read: {
                    maxPerPage: 1000
                },
                delete: {
                    soft: true
                }
            }
        },
        security: {
            enabled: true,
            token: {
                secret: context.jwtSecret,
                expiresOn: () => addDays(new Date(), 30)
            }
github webiny / webiny-js / packages / demo-api / src / configs / production.js View on Github external
export default async (context: Object) => {
    return {
        apollo: {
            introspection: context.devMode === true,
            playground: context.devMode === true
        },
        database: {
            mongodb: context.database
        },
        entity: {
            // Instantiate entity driver with DB connection
            driver: new MongoDbDriver({ database: context.database }),
            crud: {
                logs: true,
                read: {
                    maxPerPage: 1000
                },
                delete: {
                    soft: true
                }
            }
        },
        security: {
            enabled: true,
            token: {
                secret: context.jwtSecret,
                expiresOn: () => addDays(new Date(), 30)
            }

webiny-entity-mongodb

A MongoDB driver for webiny-entity.

MIT
Latest version published 5 years ago

Package Health Score

66 / 100
Full package analysis

Popular webiny-entity-mongodb functions

Similar packages