You are looking at the old Apostrophe 0.5 documentation. It is deprecated for new projects. Check out the latest version!

The minimum

← Previous: Configuration: Managing Your Project

Here's a basic app.js file that uses apostrophe-site to power a project. While pages is not strictly required, it is necessary if you want custom page templates.

var site = require('apostrophe-site')({
  // Allows apostrophe-sites to require stuff
  // on our behalf and also find our root folder
  root: module,

  // Used to name the local mongodb database,
  // if you don't pass a db option with more details
  shortName: 'mysite',

  // Hostname you plan to give your site
  hostName: '',

  // You can always log in at /login as admin, with this password

  // a random session secret
  sessionSecret: 'SOMETHING RANDOM',

  // Any options accepted by the apostrophe-pages module go here.
  // The `name` field refers to the template in the views/pages folder.
  pages: {
    // List all the page types users should be able to add here
    types: [
      { name: 'default', label: 'Default Page Template' },
      { name: 'home', label: 'Home Page Template' }

Next: With all of the options →