TinyFox is a standalone, lightweight, and extensible WebApi first-level framework, with support for "Dynamic HTML" and WebSockets as well. TinyFox 是一款独立、轻快且富有良好扩展能力的 WebApi 一级基础框架,同时,支持“动态HTML”和 WebSocket 也是它的重要特征。
$ dotnet add package TinyfoxTinyfox is an independent, lightweight, and well-extensible WEB framework, with its own HTTP server, with WebApi, WebSocket and "Dynamic HTML" three key features, which can be used to quickly build various types of powerful and timely interactive Web service programs.
Tinyfox 是一款独立、轻快且具有良好扩展能力的WEB服务程序基础框架,自带HTTP服务器,具备 WebApi、WebSocket 和“动态HTML”三大关键特性,可用于快速构建功能强大且富有及时交互能力与灵活表达能力的 Web 程序。
Example:
using Tinyfox.WebApiEngine;
using Tinyfox.WebApiEngine.Results;
// Add the following code to the Main() method
// Configure port (The default value is 8088)
Fox.Port = 8080;
// Configure routing parameters
var router = (HttpRoute)Fox.Router;
router.GET["/"] = _ => new TextResult("Hello, World.");
router.GET["/api/values/{value}"] = c => {
var value = c.Request["value"];
return new TextResult($"value is '{value}'");
};
// Start and wait for exit
Fox.Start();
Fox.WaitExit();
// After the program is launched ...
// Access the "http://localhost:8080/" with a browser
// Or access the "http://localhost:8080/values/123"
Technical Manuals: www.tinyfox.net/manual
Developer Email: j66x@163.com