Lightweight.NetCore.MVC:已配置Bootstrap,JQuery,Typescript的Net Core

  • u8_906979
  • 41.9KB
  • zip
  • 0
  • VIP专享
  • 0
  • 2022-04-23 10:20
轻量级NetCore MVC模板 带有Bootstrap,JQuery,Typescript的Net Core 2.1原始MVC项目。 最小化HTML,XML,CSS,JS以及用于登台和产品集成的捆绑。 开发人员证书对开发和登台的HTTPS支持。 与先前版本相比的变化 改编了符合Net Core 2.1规范的代码。 更新了外部软件包。 不再使用凉亭,现在使用npm。 不再使用应用程序设置,现在使用环境变量。 现在通过变量ASPNETCORE_URLS推断SSL_PORT 添加了库envsafe来检查所需的环境变量。 如何设置环境变量进行开发 VisualStudio:属性/launchSettings.json 骑士:从“运行/调试配置”(它将保存到sln根目录中的隐藏文件夹.idea中) 如何设置环境变量以进行释放 码头工人:码头工人组成/环境 Kubernetes:de
# Lightweight NetCore MVC Template - Net Core 2.1 raw MVC project with Bootstrap, JQuery, Typescript configurated. - Minification of HTML, XML, CSS, JS and bundling for Staging and Product integrated. - HTTPS support for Dev and Staging with dev's certificate. # Changes from previous version - Adapted the code the be Net Core 2.1 compliance. - Updated the external packages. - No longer uses bower, now it uses npm. - No longer uses appsettings, now it uses environment variables. - SSL_PORT now is inferred by the variable ASPNETCORE_URLS - Added library `envsafe` for checking required environment variables. # How to setup environment variables for development - VisualStudio: Properties/launchSettings.json - Rider: From Run/Debug Configurations (it will be saved to a hidden folder .idea in the root of the sln) # How to setup environment variables for releasing - Docker: docker-compose/environment - Kubernetes: deployment.yaml/env or deployment.yaml/envFrom ## Suggested repository structure ``` - src (source code projects) - tests (projects for unit testing) - NuGet.config (sets the configuration for NuGet repositories) - .gitignore (sets the ignorable files for git) - .dockerignore (for creating a docker image) - README (file with information about the solution) ``` ## Website template - The website uses .NET Core 2.1 MVC. - Uses Kestrel to run the application, no more buggy IIS Express. - Uses Environment Variables instead of appsettings.json ## Packages - Back end packages are managed by **NuGet** using the **.csproj** for loading packages. - Front end packages are managed by **npm** using the file **packages.json** for loading configuration. ## Minification - BuildBundlerMinifier is installed in order to minify CSS and JS files located in **bundleconfig.json** - WebMarkupMin.AspNetCore2 is installed in order to minify XML, HTML and add gzip compression to the pipeline. ## Icon [Thanks to Oliviu Stoian from **the noun project** for the icon.](