Advertisement
Guest User

main.m

a guest
Aug 12th, 2014
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #import <HTTPKit/HTTPKit.h>
  2.  
  3. int main(int argc, char **argv) {
  4. NSAutoreleasePool *p = [[NSAutoreleasePool alloc] init];
  5. int ret = UIApplicationMain(argc, argv, @"nameApplication", @"nameApplication");
  6. [p drain];
  7. HTTPServer * serv = [[HTTPServer alloc] init];
  8. [serv handleGET:@"/hello/*"
  9. with:^(HTTPConnection *connection, NSString *name) {
  10. return [NSString stringWithFormat:@"Hello %@!", name];
  11. }];
  12. return ret;
  13. }
  14.  
  15. // vim:ft=objc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement