| 163 | } |
| 164 | |
| 165 | int main( int argc, const char * argv[] ) |
| 166 | { |
| 167 | try |
| 168 | { |
| 169 | const auto args = app_args_t::parse( argc, argv ); |
| 170 | |
| 171 | if( !args.m_help ) |
| 172 | { |
| 173 | if( args.m_trace_server ) |
| 174 | { |
| 175 | using traits_t = |
| 176 | restinio::tls_traits_t< |
| 177 | restinio::asio_timer_manager_t, |
| 178 | restinio::shared_ostream_logger_t >; |
| 179 | |
| 180 | run_server< traits_t >( args ); |
| 181 | } |
| 182 | else |
| 183 | { |
| 184 | run_server< restinio::default_tls_traits_t >( args ); |
| 185 | } |
| 186 | } |
| 187 | } |
| 188 | catch( const std::exception & ex ) |
| 189 | { |
| 190 | std::cerr << "Error: " << ex.what() << std::endl; |
| 191 | return 1; |
| 192 | } |
| 193 | |
| 194 | return 0; |
| 195 | } |