auto2http
webStorm根据配置来自动生产 xx.http文件 用于对接口的测试 只能在node项目中使用 WebStorm automatically produces the xx.http file according to the configuration. It is used to test the API. It can only be used in the nodejs project.
const Auto2http = const path = const route = Auto2http /* path.join(__dirname, '../api ') 接口文件的根目录 为绝对路径 The root directory of the interface file is an absolute path*/// true 是否自动生成提示 routes属性的提示// Whether to automatically generate a prompt for the routes attribute
仅仅是因为要生成导出是有代码提示
main// Just because there is a code hint to generate the export
main函数
给app加路由配置 app.method(path,method)
Auto2http
路由编写
// 接口文件// api/ msa.jsmodule {return{res}{res}{}}