-
您好,新建ssr midwayjs+vue3项目后使用vite访问任意页面404,操作步骤与debug日志如下:
```bash
$ npm init ssr-app wenku -- --template=midway-vue3-ssr
$ cd wenku && yarn && yarn add -D vite @vitejs/plugin-vue
```
```log
$…
-
初学者,跟着文档学的,https://www.yuque.com/midwayjs/midway_v2/web_middleware,
发现全局中间件2种使用方法表现不一致的问题。
全局中间件:
```typescript
// src/middleware/global.ts
import { Provide } from "@midwayjs/decorator";
imp…
-
在有些时候,希望某个类能够被在应用之前被加载一次,比如读取一些配置,同步一些数据等等。由于在 IoC 的体系中,类只有在请求到才会被实例化,不管是请求作用域还是单例,都无法被提前执行。
在现有的方案中,碰到这个情况,我们往往会在 app.ts 中做一些比较简陋的操作。
```ts
export = (app) => {
app.beforeStart(async () => {…
-
如题
-
因为当前路由注册是分散式的,如果当某一路由没有命中时,想要排查起来会很麻烦,希望能提供获取当前应用注册的所有路由的方式。
建议:
1:dev 启动时,把所有的路由打印到控制台;
2: 启动时,写入 log;
3: 提供 cli 命令查看;
atzcl updated
3 years ago
-
我看到 midwayjs V2 版本的写法更加简单,而且也有 swagger 的支持,但是 fass 依然是 v1 版本,预计什么时候能升到 v2 呢?
-
文档显然不一样。这是两个版本?还是两个部分?
那么分别对应的代码分支是哪个?
谢谢你
-
* **Node Version**: v14.15.0
* **@midwayjs/koa Version**: 2.7.2
* **Plugin Name**:
* **Plugin Version**:
* **Platform**: mac OS Big Sur
* **Mini Showcase Repository**: https://github.com/xuxucod…
-
我仿照 [@midway/orm](https://github.com/midwayjs/midway-component/tree/master/packages/orm) 的代码写了一个包 [@calibur/fass](https://github.com/calibur-tv/CaliburOpenAPI/tree/master/packages/vendor),但是在 [sign](h…
-
midway2使用graphql总是不成功。