Nexpress.Test/Program.cs

(完整代码) 728B

namespace Nexpress.Test
{
    class Program
    {
        static void Main(string[] args)
        {
            Application app = new Application();

            app.Use(async (req, res, next) =>
            {
                await res.Send("这是执行之前\r\n");
                await next(req, res);
                await res.Send("这是执行之后\r\n");
            });

            app.Get("/user", async (req, res) =>
            {
                await res.Send("测试user\r\n");
            });

            app.Get("/user/:id", async (req, res) =>
            {
                await res.Send("测试user,id=" + req.Param["id"]+ "\r\n");
            });

            app.Listen(5000);
        }
    }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。