var http = require('helma/httpserver');
http.start({
    port: 8080,
    moduleName: 'jack/narwhal',
    functionName: 'Narwhal'
});

// Alternatively, you can pass the jack app to start() as second argument.
// this bypasses module loading in the servlet, so changes in the Jack app won't be picked up.
// http.start({ port: 8080 }, require('jack/narwhal').Narwhal);

try {

    // fail fast if no jack libs on the module path
    require('jack/narwhal');

    var http = require('helma/httpserver');
    http.start({
        port: 8080,
        moduleName: 'jack/narwhal',
        functionName: 'Narwhal'
    });

    // Alternatively, you can pass the jack app to start() as second argument.
    // this bypasses module loading in the servlet, so changes in the Jack app won't be picked up.
    // http.start({ port: 8080 }, require('jack/narwhal').Narwhal);

} catch (error) {
    print();
    print("Can't start Jack demo. Make sure you have Jack installed and configured as described in README.txt.");
    print();
    print(error);
}

Print message and exit if jack libs can't be loaded.
Print message and exit if jack libs can't be loaded.

git-svn-id: fac99be8204c57f0935f741ea919b5bf0077cdf6@9642 688a9155-6ab5-4160-a077-9df41f55a9e9
