Alan Yang

Results 3 issues of Alan Yang

According to the document of [sqlx-cli](https://crates.io/crates/sqlx-cli) ```bash # only for postgres cargo install sqlx-cli --no-default-features --features native-tls,postgres ``` https://github.com/LukeMathWalker/zero-to-production/blob/root-chapter-03-part1/scripts/init_db.sh#L13 `cargo install --version=0.6.0 sqlx-cli --no-default-features --features postgres` would output this error...

首次使用时,在项目根目录运行 `node .\src\api-server\api-server.js` 和 `node .\src\proxy-server\proxy-server.js`。 发现 hook 注入失败。 排查了控制台的报错发现 `fs.readFileSync` 读取文件报错。问题原因就是使用的相对路径读取。 目前要正常运行需要切换到 api-server.js 和 proxy-server.js 目录下面。 为了保证运行时,不受目录限制,建议使用 ```js const path = require('path') path.join(__dirname, myFileRelativePath) ```

```javascript var foo = 1; (function() { let worker = { someMethod() { return 1; }, slow(x) { console.log("Called with " + x); return x * this.someMethod(); // (*) }...