void OptionWidget::startServer() { WebServer* svr = WebServer::getInstance(); svr->setDocumentRoot(_edit_rootdir->text().toStdString().c_str()); svr->setPort(_edit_port->text().toUShort()); svr->setEnableDirectoryListing(_cbox_dirlist->isChecked()); svr->start(); _btn_start->setEnabled(false); _btn_stop->setEnabled(true); _btn_restart->setEnabled(true); }
int main(int argc, char* argv[]) { WebServer server; server.start(); return 0; }