1 // require the main njspurls module
2 var app = require("njspurls");
4 // below we set a bunch of things globally for the app
5 // set the port to listen to
8 // location for loading "purls" - this is the default
9 app.setPurlPath("./purls");
11 // location for static resources - default
12 app.setResPath("./res");
14 // purl to load for main page, i.e. /
15 // this will search for main.js from purls/ (this is the default)
16 // note - if none is provided, it defaults to layouts from layouts.js
17 app.setDefaultMainPurl("main");
19 // add some menu items for the default menu builder - a simple menu
20 // building mechanism which creates an array in global that can then be
21 // rendered via the layout.menu function
22 app.addMenu("Home", "/");
23 app.addMenu("SimpleLayout", "/simplelayout");
24 app.addMenu("LayoutOnly", "/justlayout");
26 // default name for the application. Used by default section
27 // builders where a name is required
28 app.setAppName("MyExampleApp");
30 // set some default footer text (typically a copyright notice or something)
31 app.setFooterText("<br><br><font size=\"-2\"><i>Copyright PJR.cc 2012 ©</i></font>");
34 // now start the application