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:
Kevin Whitaker
2017-01-28 00:56:22 -05:00
parent 093f74a846
commit a60e2a0c34
6 changed files with 68 additions and 3 deletions

View File

@@ -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;
}
}