{"id":265,"date":"2018-10-07T18:29:11","date_gmt":"2018-10-07T09:29:11","guid":{"rendered":"http:\/\/milennium9.godohosting.com\/wordpress\/?p=265"},"modified":"2018-10-07T21:36:01","modified_gmt":"2018-10-07T12:36:01","slug":"c-nancy%eb%a5%bc-%ec%82%ac%ec%9a%a9%ed%95%98%ec%97%ac-%ea%b0%84%eb%8b%a8%ed%95%9c-restful-web-hosting-%ec%8b%9c%ec%9e%91%ed%95%98%ea%b8%b0","status":"publish","type":"post","link":"http:\/\/milennium9.godohosting.com\/wordpress\/?p=265","title":{"rendered":"[C#] Nancy\ub97c \uc0ac\uc6a9\ud558\uc5ec \uac04\ub2e8\ud55c Restful Web Hosting \uc2dc\uc791\ud558\uae30"},"content":{"rendered":"<p>\uac8c\uc784 \uc11c\ubc84 \uad00\ub9ac\ud234\uc744 \ub9cc\ub4e4\uae30 \uc704\ud574\uc11c \uc5b4\ub5a0\ud55c \ubc29\uc2dd\uc774 \uc88b\uc744\uae4c \uace0\ubbfc\ud558\ub2e4\uac00 \uac01 \uba38\uc2e0\uc5d0 restful web server\ub97c \uc124\uce58\ud574\uc11c \ud2b9\uc815 \uba85\ub839\uc5b4\ub97c \ubc1b\uc544\uc11c \ucc98\ub9ac\ud558\ub3c4\ub85d \ud558\uba74 \ub418\uaca0\ub2e4 \uc2f6\uc5b4\uc11c \uac80\uc0c9\ud574\ubcf4\ub2c8 Nancy\ub77c\ub294 \ub77c\uc774\ube0c\ub7ec\ub9ac\uac00 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<p>\uc544\uc8fc \uac04\ub2e8\ud558\uac8c Resful Web API\ub97c \uad6c\uc131\ud560 \uc218 \uc788\ub3c4\ub85d \ub9cc\ub4e4\uc5b4\uc838 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<p>\uc6b0\uc120 Visual Studio Nuget package manager\uc5d0\uc11c Nancy.SelfHosting\uc744 \uc124\uce58\ud569\ub2c8\ub2e4.<\/p>\n<p>\uadf8\ub9ac\uace0 \uc544\ub798\uc758 \ucf54\ub4dc\uc5d0\uc11c \ud655\uc7a5\uc744 \uc2dc\uc791\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<pre class=\"lang:c# decode:true \">using Nancy;\r\nusing Nancy.Hosting.Self;\r\nusing System;\r\n\r\nnamespace NancyTest\r\n{\r\n    public class MainModule : NancyModule\r\n    {\r\n        public MainModule() {\r\n            Get[\"\/\"] = x =&gt; { return \"Hello World\"; };\r\n            Post[\"\/config\"] = x =&gt; {\r\n                return 200;\r\n            };\r\n        }\r\n    }\r\n\r\n    class Program\r\n    {\r\n        static void Main(string[] args) {\r\n            var hostConfigs = new HostConfiguration {\r\n                UrlReservations = new UrlReservations() { CreateAutomatically = true }\r\n            };\r\n            Uri uri = new Uri(\"http:\/\/localhost:1234\");\r\n            using (var host = new NancyHost(hostConfigs, uri)) {\r\n                host.Start();\r\n                Console.WriteLine(\"http:\/\/localhost:1234 hosting started!\");\r\n                Console.ReadLine();\r\n            }\r\n        }\r\n    }\r\n}\r\n<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uac8c\uc784 \uc11c\ubc84 \uad00\ub9ac\ud234\uc744 \ub9cc\ub4e4\uae30 \uc704\ud574\uc11c \uc5b4\ub5a0\ud55c \ubc29\uc2dd\uc774 \uc88b\uc744\uae4c \uace0\ubbfc\ud558\ub2e4\uac00 \uac01 \uba38\uc2e0\uc5d0 restful web server\ub97c \uc124\uce58\ud574\uc11c \ud2b9\uc815 \uba85\ub839\uc5b4\ub97c \ubc1b\uc544\uc11c \ucc98\ub9ac\ud558\ub3c4\ub85d \ud558\uba74 \ub418\uaca0\ub2e4 \uc2f6\uc5b4\uc11c \uac80\uc0c9\ud574\ubcf4\ub2c8 Nancy\ub77c\ub294 \ub77c\uc774\ube0c\ub7ec\ub9ac\uac00 \uc788\uc2b5\ub2c8\ub2e4. \uc544\uc8fc \uac04\ub2e8\ud558\uac8c Resful Web API\ub97c \uad6c\uc131\ud560 \uc218 \uc788\ub3c4\ub85d \ub9cc\ub4e4\uc5b4\uc838 \uc788\uc2b5\ub2c8\ub2e4. \uc6b0\uc120 Visual Studio Nuget package manager\uc5d0\uc11c Nancy.SelfHosting\uc744 \uc124\uce58\ud569\ub2c8\ub2e4. \uadf8\ub9ac\uace0 \uc544\ub798\uc758 \ucf54\ub4dc\uc5d0\uc11c \ud655\uc7a5\uc744 \uc2dc\uc791\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. using Nancy; using Nancy.Hosting.Self; &hellip; <a href=\"http:\/\/milennium9.godohosting.com\/wordpress\/?p=265\" class=\"more-link\"><span class=\"screen-reader-text\">[C#] Nancy\ub97c \uc0ac\uc6a9\ud558\uc5ec \uac04\ub2e8\ud55c Restful Web Hosting \uc2dc\uc791\ud558\uae30<\/span> \ub354\ubcf4\uae30 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_newsletter_tier_id":0},"categories":[5],"tags":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5PypW-4h","_links":{"self":[{"href":"http:\/\/milennium9.godohosting.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/265"}],"collection":[{"href":"http:\/\/milennium9.godohosting.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/milennium9.godohosting.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/milennium9.godohosting.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/milennium9.godohosting.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=265"}],"version-history":[{"count":1,"href":"http:\/\/milennium9.godohosting.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/265\/revisions"}],"predecessor-version":[{"id":266,"href":"http:\/\/milennium9.godohosting.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/265\/revisions\/266"}],"wp:attachment":[{"href":"http:\/\/milennium9.godohosting.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=265"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/milennium9.godohosting.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=265"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/milennium9.godohosting.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=265"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}