提交 bce18db4 编写于 作者: JasonWcx's avatar JasonWcx

修改README.MD

上级 3760d05a
......@@ -64,10 +64,13 @@ HttpEmbedded在Socket之上使用异步单线程模型,构建了一个HTTP服务
//配置端口并启动服务器
hs.SetPort(9000).Start();
//开启认证
hs.UseAuth(AuthType.Basic).SetUser("admin", "admin");
//加载程序
//路由注入
hs.UseAuth(AuthorizationType.Basic).SetUser("admin", "admin");
//开启静态文件支持
hs.UseStaticFiles("");
//路由映射
Router router = Router.Default;
router.Map("services/{controller}/{id}");
Console.ReadLine();
~~~
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册