service-mw2 icon indicating copy to clipboard operation
service-mw2 copied to clipboard

Node.js 全栈开发之 Midway.js 最佳实践

Results 8 service-mw2 issues
Sort by recently updated
recently updated
newest added

3.x 的改动比较大,将新建一个新的分支处理

see: https://code.visualstudio.com/updates/v1_64#_automatic-replies

base model中id为string的意义是什么?数据库id不是基本都是int或者bugint类型?这里数据模型id也应该是number才是啊,为啥是string。求科普一下

npm v6 执行安装(本来用v7然后版本回退改用v6) ```bash ➜ service-mw2 git:(master) ✗ npm install npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: [email protected] npm...

项目未做任何修改, 运行环境 ```bash yarn docker-compose up -d # 修改数据库的操作做了,这里忽略不写 yarn dev ``` 然后就报错了。 如下第四行所示 ```typescript // src/app/service/rabbitmq.ts > RabbitmqService > connect async connect() { // 创建连接 // @ts-ignore 这一行必须添加忽略注释才能通过 this.connection...

如果给ts定义number list,装饰器定义varchar,在service是可以解析到变量有两种类型。 但是在model当前文件是解析不到的。 ![image](https://user-images.githubusercontent.com/43880841/104834506-c66bcb00-58da-11eb-9597-24850fd1d4a4.png) ![image](https://user-images.githubusercontent.com/43880841/104834521-e0a5a900-58da-11eb-85ae-00ba050d45cb.png) 即使在上述支持的情况下,转换数据类型也是会被ts捕捉的,毕竟split不存在于number list中。 这种涉及序列化的场景,有什么好的解决方案吗,我看了案例中的转换,属于强转,感觉与any无异。

question

## 问题描述 配套前端项目[https://github.com/fsd-nodejs/pc]请求的接口跟此项目提供的接口对应不上,因此前端项目请求接口总是失败,请问该怎么解决呢?

question

运行 npm run dev; 报错数据库连不上 Host 'host.docker.internal' is not allowed to connect to this MySQL server 我找到一个[问题地址](https://forums.docker.com/t/host-host-docker-internal-is-not-allowed-to-connect-to-this-mysql-server/88226),不太理解 我安装了docker desk

question