Shao Yu-Lung (Allen)

Results 20 comments of Shao Yu-Lung (Allen)

Suggestions to follow Multiple Projects folder structure: no need edit .env config file. when `www` folder is a laravel project `cp -r nginx/sites/laravel.conf.example nginx/sites/www.test.conf` edit nginx/sites/www.test.conf ``` server_name www.test root...

for a beginner start ref https://laradock.io/introduction/#quick-overview `nginx/sites/default.conf` origin design is laradock in laraval project and base on `single project concept` folder struct must is: ```bash laravel_app_folder ├── laradock └── public/index.php...

@fengmk2 使用 egg-passport-local 插件,試過直接拋異常如下: ``` // app.js app.passport.verify(async (ctx, user) => { throw new Error('找不到 user'); } ``` 在 npm run dev 執行的環境下,網頁就回應 500 狀態碼。

@OnedayLiu 我正好在研究當 verify 失敗時要如何處理錯誤訊息讓前端可以顯示 https://github.com/eggjs/egg-passport/blob/0afce5b0d5fbc107730e10dad6aff915c03cf079/lib/passport.js#L63-L76 ``` doVerify(req, user, done) { const hooks = this._verifyHooks; if (hooks.length === 0) return done(null, user); (async () => { const ctx = req.ctx; for...

我試過改成這樣但還是不行,還是 500 錯誤跑到 node_modules/koa-onerror/index.js 出現 non-error thrown 錯誤訊息,看來我的認知還不夠完整 ``` doVerify(req, user, done) { const hooks = this._verifyHooks; if (hooks.length === 0) return done(null, user); (async () => { const ctx...

> try `docker compose build --no-cache --pull php-fpm workspace`