c0065e1bb684326dd898d0d595aeb2058c3361dd
[nodejsws.git] / examples / simple / myapp.js
1 // require the main njspurls modules
2 var app = require("njspurls");
3
4 // below we set a bunch of things globally for the app
5 // set the port to listen to
6 app.setPort(8888);
7
8 // location for loading "purls"
9 app.setPurlPath("./purls");
10
11 // location for static resources
12 app.setResPath("./res");
13
14 // purl to load for main page, i.e. /
15 // this will search for main.js from purls/ (this is the default)
16 app.setDefaultMainPurl("main");
17
18 // add some menu items for the default menu builder
19 app.addMenu("Home", "/");
20 app.addMenu("SimpleLayout", "/simplelayout");
21 app.addMenu("LayoutOnly", "/justlayout");
22
23 // default name for the application. Used by default section
24 // builders where a name is required
25 app.setAppName("MyExampleApp");
26
27 // set some default footer text (typically a copyright notice or something
28 app.setFooterText("<br><br><font size=\"-2\"><i>Copyright PJR.cc 2012 &copy;</i></font>");
29
30
31 // now start the application
32 app.start();
33