Created
July 24, 2010 08:13
-
-
Save daschl/488526 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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