Ok, look into your tntnet.xml, what are is set to UrlMap? You found on the homepage a start guid he see you a samll code for a standalone application.
Creating a standalone web application -> http://www.tntnet.org/quick-start-guide.html 2014-08-26 15:24 GMT+02:00 Jean-Michel Caricand <[email protected]>: > That works with : > > #include <tnt/tntnet.h> > #include <cxxtools/log.h> > #include <cxxtools/xml/xmldeserializer.h> > > log_define("main"); > > int main(int argc, char* argv[]) > { > try { > log_init(); > > tnt::Tntnet app; > tnt::TntConfig config; > > std::ifstream conf("tntnet.xml"); > > app.mapUrl("^/$", "MyApp"); > app.mapUrl("^/([^.]+)(\\..+)?", "$1"); > > cxxtools::xml::XmlDeserializer deserializer(conf); > deserializer.deserialize(config); > > app.init(config); > > app.run(); > } > catch (const std::exception& e) { > std::cerr << e.what() << std::endl; > } > } > > > > Le 26/08/2014 14:19, Jouven a écrit : >> Hi, >> >> I'm assuming you have used the "tntnet-config --project MyApp" as a >> "template" to create your standalone application version of it. I >> think the problem is that you missed to add the component part, the >> ecpp file, you can just "ecppc" the MyApp.ecpp to get a MyApp.cpp and >> add it to your project. >> >> Joan Escalas >> On 26/08/2014 13:44, Jean-Michel Caricand wrote: >>> Hello, >>> >>> I created a standalone application : >>> >>> tntnet-config --project MyApp >>> >>> In my main.cpp, I have : >>> >>> #include <tnt/tntnet.h> >>> #include <cxxtools/log.h> >>> #include <cxxtools/xml/xmldeserializer.h> >>> >>> log_define("main"); >>> >>> int main(int argc, char* argv[]) >>> { >>> try { >>> log_init(); >>> >>> tnt::Tntnet app; >>> tnt::TntConfig config; >>> >>> std::ifstream conf("tntnet.xml"); >>> >>> cxxtools::xml::XmlDeserializer deserializer(conf); >>> deserializer.deserialize(config); >>> >>> app.init(config); >>> >>> app.run(); >>> } >>> catch (const std::exception& e) { >>> std::cerr << e.what() << std::endl; >>> } >>> } >>> >>> I run my app : >>> >>> ./myapp >>> >>> When I try to access to my app, I get this error : >>> >>> Error >>> >>> Not Found: vhost: localhost:8000 / >>> >>> Any idea ? >>> >>> Thank, >>> >>> Jean-Marc >>> >>> ------------------------------------------------------------------------------ >>> >>> Slashdot TV. >>> Video for Nerds. Stuff that matters. >>> http://tv.slashdot.org/ >>> _______________________________________________ >>> Tntnet-general mailing list >>> [email protected] >>> https://lists.sourceforge.net/lists/listinfo/tntnet-general >> > > > ------------------------------------------------------------------------------ > Slashdot TV. > Video for Nerds. Stuff that matters. > http://tv.slashdot.org/ > _______________________________________________ > Tntnet-general mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/tntnet-general ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ Tntnet-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tntnet-general
