2020/05/25

Use React.js react-dom-router with Laravel

架構為Laravel提供API,React則是前端
Laravel auth的guard則是web
Route::get('{reactRoutes}', function () {
    return view('index'); // your start view
})->where('reactRoutes', '^((?!api).)*$');
參考資料:
https://stackoverflow.com/questions/40719951/how-to-use-react-router-with-laravel

2020/05/14

Fix pkg error updating repositories on FreeNAS 11.3

最近幫朋友再用FreeNAS,那他希望能再同台機器架設網站
結果出現了下方錯誤..
[root@freenas ~]# pkg install nginx
Updating local repository catalogue...
pkg: Repository local load error: access repo file(/var/db/pkg/repo-local.sqlite) failed: No such file or directory
pkg: file:///usr/ports/packages/meta.txz: No such file or directory
repository local has no meta file, using default settings
pkg: file:///usr/ports/packages/packagesite.txz: No such file or directory
Unable to update repository local
Error updating repositories!

輸入