Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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)
}
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)
}
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)
}
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)
}
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)
}
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)
}