Make GroovePlayer a singleton to avoid being created for each browser. Add login UI component to eventually hold landing screen. Actually start server with initial interface.
This commit is contained in:
26
src/main.cpp
26
src/main.cpp
@@ -1,8 +1,30 @@
|
||||
#include <iostream>
|
||||
#include "WebInterface.h"
|
||||
#include <Wt/WServer>
|
||||
#include <Wt/WConfig.h>
|
||||
#include "GroovePlayer.h"
|
||||
|
||||
Wt::WApplication* createApplication(const Wt::WEnvironment& env)
|
||||
{
|
||||
return new WebInterface(env);
|
||||
}
|
||||
|
||||
int main ( int argc, char** argv )
|
||||
{
|
||||
std::cout << "Hello, world!" << std::endl;
|
||||
return 0;
|
||||
try {
|
||||
Wt::WServer server(argv[0]);
|
||||
server.setServerConfiguration(argc, argv, WTHTTP_CONFIGURATION);
|
||||
server.addEntryPoint(Wt::Application, createApplication);
|
||||
if(server.start())
|
||||
{
|
||||
int sig = Wt::WServer::waitForShutdown(argv[0]);
|
||||
server.stop();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
catch (Wt::WServer::Exception& e)
|
||||
{
|
||||
std::cerr << e.what() << "\n";
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user