source: PSPA/Interface_Web/trunk/pspaWT/sources/controler/src/main.cc @ 257

Last change on this file since 257 was 257, checked in by garnier, 11 years ago

refactoring

File size: 1.0 KB
Line 
1#include <iostream>
2#include <Wt/WApplication>
3#include <Wt/WEnvironment>
4#include "GWt_pspaApplication.h"
5
6#include "environmentVariables.h"
7
8WApplication *createApplication(const WEnvironment& env)
9{
10  /*
11   * You could read information from the environment to decide whether
12   * the user has permission to start a new application
13   */
14  return new PspaApplication(env);
15}
16
17int main(int argc, char **argv)
18{
19  /*
20   * Your main method may set up some shared resources, but should then
21   * start the server application (FastCGI or httpd) that starts listening
22   * for requests, and handles all of the application life cycles.
23   *
24   * The last argument to WRun specifies the function that will instantiate
25   * new application objects. That function is executed when a new user surfs
26   * to the Wt application, and after the library has negotiated browser
27   * support. The function should return a newly instantiated application
28   * object.
29   */
30  std::cout <<  " working area = " << WORKINGAREA << std::endl;
31  return WRun(argc, argv, &createApplication);
32}
Note: See TracBrowser for help on using the repository browser.