.NET 的微型 Web 框架 Nina
fmms
13年前
<p><span>Nina</span> 是一个 .NET 的微型 Web 框架,其思路来自 Ruby 的 <a href="http://www.open-open.com/lib/view/open1323762507296.html">Sinatra</a> 框架。</p> <p>示例代码:</p> <pre>Post(<span class="s"><span class="dl">"</span><span class="k">/</span><span class="dl">"</span></span>, (m,c)=>; { <span class="r">var</span> url = Urls.Save(c.Request.Form[<span class="s"><span class="dl">"</span><span class="k">url</span><span class="dl">"</span></span>]); <span class="r">return</span> Text(<span class="pt">string</span>.Format(<span class="s"><span class="dl">@"</span><span class="k"><html><body>Your url: <a href='{0}'>{0}</a></body></html></span><span class="dl">"</span></span>, c.Request.Url +url)); });</pre> <p><strong>项目主页:</strong><a href="http://www.open-open.com/lib/view/home/1325777423421" target="_blank">http://www.open-open.com/lib/view/home/1325777423421</a></p>