Skip to content

Instantly share code, notes, and snippets.

@daschl
Created July 24, 2010 08:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daschl/488526 to your computer and use it in GitHub Desktop.
Save daschl/488526 to your computer and use it in GitHub Desktop.
var g = require('./garcon/lib/garcon'), server, myApp;
// create a server which will listen on port 8000 by default
server = new g.Server();
// adding an application named 'myApp' tells the server to respond to
// the /myApp url and to create a myApp.html file when saving
myApp = server.addApp({
name: 'testing',
theme: 'sc-theme',
buildLanguage: 'english'
});
// myApp needs SproutCore to run
myApp.addSproutcore();
// add other dependencies
myApp.addFrameworks(
{ path: 'frameworks/sproutcore/themes/empty_theme'},
{ path: 'frameworks/sproutcore/themes/standard_theme'},
{ path: 'apps/testing'}
);
// add some html for inside the <head> tag
myApp.htmlHead = '<title>My App</title>';
// add some html for inside the <body> tag
myApp.htmlBody = [
'<p id="loading">',
'Loading…',
'</p>'
].join('\n');
// build the app
myApp.build();
// run the server
server.run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment