Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
await keystone.createItems(initialData);
}
},
});
const authStrategy = keystone.createAuthStrategy({
type: PasswordAuthStrategy,
list: 'User',
});
keystone.createList('User', User);
keystone.createList('Post', Post);
keystone.createList('PostCategory', PostCategory);
keystone.createList('Comment', Comment);
const adminApp = new AdminUIApp({
adminPath: '/admin',
hooks: require.resolve('./admin/'),
authStrategy,
isAccessAllowed: ({ authentication: { item: user } }) => !!user && !!user.isAdmin,
});
module.exports = {
keystone,
apps: [
new GraphQLApp(),
new StaticApp({ path: staticRoute, src: staticPath }),
adminApp,
new NextApp({ dir: 'app' }),
],
distDir,
};