Skip to content
main.cpp 755 B
Newer Older
#include <iostream>
#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 )
{
    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;
    }