.NET Core 上的 Web -- ASP.NET Core

.NET Core 上不光可以做控制台的程序, 还可也实现 AST.NET 的 Web 应用, 而且是自带服务器的那种. 像 NodeJS, Spring Boot, Netty 那种非容器型的嵌入式的 Web Server, 非常适合于做微服务应用. 谁说 ASP.NET 就一定要部署到 IIS 上呢?

本文参考 https://docs.asp.net/en/latest/getting-started.html 而来, 基本步骤是一致的

1. 安装 .NET Core

参考上一篇 .NET Core 上手体验 Hello World

2. 创建 .NET Core 项目

mkdir appnetcoreapp
cd aspnetcoreapp
dotnet new

3. 更新 project.json 引入 Kestrel HTTP server 依赖

阅读全文 >>