Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
});
// Load your project's Models
keystone.import('models');
// Setup common locals for your templates. The following are required for the
// bundled templates and layouts. Any runtime locals (that should be set uniquely
// for each request) should be added to ./routes/middleware.js
keystone.set('locals', {
_: require('underscore'),
env: keystone.get('env'),
utils: keystone.utils,
editable: keystone.content.editable
});
// Load your project's Routes
keystone.set('routes', require('./routes'));
// Setup common locals for your emails. The following are required by Keystone's
// default email templates, you may remove them if you're using your own.
keystone.set('email locals', {
logo_src: '/images/logo-email.gif',
logo_width: 194,
logo_height: 76,
theme: {
email_bg: '#f9f9f9',
link_color: '#2697de',
logger: ':method :url :status :response-time ms - :res[content-length]',
'auto update': false,
session: true,
auth: true,
'user model': 'User',
compress: true,
headless: false // true to disable admin
})
keystone.import('../server/models')
keystone.set('locals', {
_,
env: keystone.get('env'),
utils: keystone.utils,
editable: keystone.content.editable
})
keystone.set('routes', server)
keystone.set('nav', {
posts: ['posts', 'post-categories'],
enquiries: 'enquiries',
users: 'users'
})
keystone.start()
});
// Load your project's Models
keystone.import('models');
// Setup common locals for your templates. The following are required for the
// bundled templates and layouts. Any runtime locals (that should be set uniquely
// for each request) should be added to ./routes/middleware.js
keystone.set('locals', {
_: require('lodash'),
env: keystone.get('env'),
utils: keystone.utils,
editable: keystone.content.editable,
});
// Load your project's Routes
keystone.set('routes', require('./cms/routes'));
// Configure the navigation bar in Keystone's Admin UI
keystone.set('nav', {
Plant: ['plants', 'plant-categories' ],
users: 'users',
});
export default (app) => {
keystone.app = app;
return keystone;
'session': true,
'auth': true,
'user model': 'User',
});
// Load your project's Models
keystone.import('models');
// Setup common locals for your templates. The following are required for the
// bundled templates and layouts. Any runtime locals (that should be set uniquely
// for each request) should be added to ./routes/middleware.js
keystone.set('locals', {
_: require('lodash'),
env: keystone.get('env'),
utils: keystone.utils,
editable: keystone.content.editable,
});
// Load your project's Routes
keystone.set('routes', require('./routes'));
// Configure the navigation bar in Keystone's Admin UI
keystone.set('nav', {
users: 'users',
});
// Start Keystone to connect to your database and initialise the web server
keystone.start();
});
// Load your project's Models
keystone.import('models');
// Setup common locals for your templates. The following are required for the
// bundled templates and layouts. Any runtime locals (that should be set uniquely
// for each request) should be added to ./routes/middleware.js
keystone.set('locals', {
_: require('underscore'),
env: keystone.get('env'),
utils: keystone.utils,
editable: keystone.content.editable
});
// Load your project's Routes
keystone.set('routes', require('./routes'));
// Configure the navigation bar in Keystone's Admin UI
keystone.set('nav', {
'posts': ['posts', 'post-categories'],
'teams': 'teams',
'users': 'users'
});
// Start Keystone to connect to your database and initialise the web server
});
// Load your project's Models
keystone.import('models');
// Setup common locals for your templates. The following are required for the
// bundled templates and layouts. Any runtime locals (that should be set uniquely
// for each request) should be added to ./routes/middleware.js
keystone.set('locals', {
_: require('underscore'),
env: keystone.get('env'),
utils: keystone.utils,
editable: keystone.content.editable
});
// Setup Store Gateway
keystone.set('store gateway', 'stripe')
// Setup Default Country
keystone.set('store country', 'Canada')
// Setup Stripe keys
keystone.set('stripe secret key', process.env.STRIPE_SECRET_KEY || 'STRIPE_SECRET_KEY')
keystone.set('stripe publishable key', process.env.STRIPE_PUBLISHABLE_KEY || 'STRIPE_PUBLISHABLE_KEY')
// Load your project's Routes
keystone.set('routes', require('./routes'));
// Configure the navigation bar in Keystone's Admin UI
})
}
// Load your project's Models
keystone.import('models');
// Setup common locals for your templates. The following are required for the
// bundled templates and layouts. Any runtime locals (that should be set uniquely
// for each request) should be added to ./routes/middleware.js
keystone.set('locals', {
_: require('underscore'),
env: keystone.get('env'),
utils: keystone.utils,
editable: keystone.content.editable
});
// Load your project's Routes
keystone.set('routes', require('./routes'));
// Setup common locals for your emails. The following are required by Keystone's
// default email templates, you may remove them if you're using your own.
keystone.set('email locals', {
logo_src: '/images/logo-email.gif',
logo_width: 194,
logo_height: 76,
theme: {
email_bg: '#f9f9f9',
link_color: '#2697de',
'auto update': true,
'session': true,
'auth': true,
'user model': 'User',
'cookie secret': '<%= cookieSecret %>',
});
keystone.import('models');
keystone.set('locals', {
_: require('underscore'),
env: keystone.get('env'),
utils: keystone.utils,
editable: keystone.content.editable,
});
keystone.set('routes', require('./routes'));
keystone.set('nav', {
'users': 'users',
});
keystone.start();
port: 3000,
'session store': 'mongo',
updates: 'updates',
'auto update': true,
session: true,
auth: true,
'user model': 'User',
'cookie secret': process.env.COOKIE_SECRET || 'development secret'
})
keystone.set('cloudinary config', process.env.CLOUDINARY_URL)
keystone.import('./models')
keystone.set('locals', {
env: keystone.get('env'),
utils: keystone.utils,
editable: keystone.content.editable,
_: require('lodash')
})
keystone.set('nav', {
users: 'users'
})
const cl = cloudinary.Cloudinary.new()
cl.fromEnvironment();
(async () => {
await next.prepare()
const context = {
keystone,
cl,
next,
Plant: keystone.list('Plant').model,
'user model': 'User',
session: true,
'cookie secret': 'd4a8c3b5fe17a9d47181844a7863d1eb53378f98' +
'8c5310139634211f343a89ecf0a05d' +
'2644b66ed5f5dfc463d82c7061d24b3f9e5928fa010cc71e33f6f0554b',
auth: true
});
keystone.set('cloudinary config', 'cloudinary://596455341385367:YHmhydy3idqIicv6uTAmDVlHpvk@dc1qjoyvn');
keystone.import('models');
keystone.set('locals', {
env: keystone.get('env'),
utils: keystone.utils,
editable: keystone.content.editable
});
keystone.set('nav', {
users: 'users',
inquiries: 'inquiries',
projects: [
'projects',
'project-categories'
],
blog: [
'posts',
'post-categories',
'post-tags'
]
});