Skip to content

Instantly share code, notes, and snippets.

@victor36max
Created April 7, 2018 12:31
Show Gist options
  • Save victor36max/800a9763aab0bcf3b21e637147dc5d3e to your computer and use it in GitHub Desktop.
Save victor36max/800a9763aab0bcf3b21e637147dc5d3e to your computer and use it in GitHub Desktop.
// Start Next app
app.prepare()
 .then(() => {
    
  // 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', {
   posts: ['posts', 'post-categories'],
   users: 'users',
  });
  
  keystone.start();
 });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment