javascript - ReactJS.Net 在哪里启动 ASP 服务?
问题描述
我正在开发一个新项目,我们正在将所有前端从 jQuery 迁移到 React,并且我们使用 ASP.Net 作为后端。之前的项目是一个,我们从 jQueryASP.Net Web Application
运行服务器并使用 ajax 访问它的方法。index.aspx
没关系,但现在我们使用的是 ReacJS.Net 模板,这有点不同,我不是 ASP.net 专家,也不知道从哪里开始。
树文件夹如下所示:
>bin
>Debug
>ClientApp
>components
>css
boot.js
>Controllers
>node_modules
>obj
>Debug
>netcoreapp2.0
LPMU.Web.AssemblyInfo.cs
LPMU.Web.AssemblyInfoInfoInput.cache
LPMU.Web.csproj.FileListAbsolute.txt
LPMU.Web.dll
LPMU.Web.pdb
LPMU.Web.csproj.nuget.cache
LPMU.Web.csproj.nuget.g.props
LPMU.Web.csproj.nuget.g.targets
project.assets.json
>package
>services
>metadata
>coreproperties
>Properties
launchSettings.json
>Views
>wwwroot
[Content_Types].xml
appsettings.Development.json
appsettings.json
LICENSE
LPMU.Web.csproj
LPMU.Web.csproj.user
npm-shrinkwrap.json
package.json
Program.cs
README.md
Startup.cs
webpack.config.js
webpack.config.vendor.js
yarn-error.log
yarn.lock
我认为 Program.cs 或 Startup.cs 将是启动它的地方,但我不确定也不知道在哪里可以找到有关此的一些文档。如果有人可以提供帮助,我将不胜感激。
谢谢你。
解决方案
I would say in the StartUp.cs, because a lot of configuration happens there. For example: when you create a new project and check the project structure, you will see that all the configuration for SPA and other stuff is put in there.
Another thing that is configured there is the webpack. I would suggest to take a look at that, aswell as the webpack.config.
推荐阅读
- pytorch - ValueError:优化器得到一个空的参数列表
- php - 如何修复错误:SQLSTATE[42S02]: Base table or view not found: 114 6 表 'bbs_hnq.configs' 不存在(SQL: select * from `configs` limit 1)
- reactjs - 正确处理将摄像机流式传输到 HTML 视频元素的 React Hooks
- java - 使用 Executors.newCachedThreadPool 时 Java 常驻内存增长
- sql-server - SQL - WHERE 子句中的 AND 条件
- json - 如何从字符串中替换“并形成有效的Json
- python - 在匹配之前选择第一个日期,直到找到另一个匹配
- mysql - 如何加入没有记录的表?
- c++ - 如何使 cmake 支持 gcov
- machine-learning - (交叉)CNN 模型验证——何时引入测试数据?