NextJS connect to backend Go api for buffering response
如果是 ASP 或 PHP 類的技術,可以透過設定 response 的 timeout 時間,再加上 flush (或類似機制)達成。這樣的處理用在需要較長執行時間的 api (或頁面)的情境相當適合,但如果是 nextjs 前端搭配 golang 後端,就沒有類似的機制,需要改用其他方式。
如果是 ASP 或 PHP 類的技術,可以透過設定 response 的 timeout 時間,再加上 flush (或類似機制)達成。這樣的處理用在需要較長執行時間的 api (或頁面)的情境相當適合,但如果是 nextjs 前端搭配 golang 後端,就沒有類似的機制,需要改用其他方式。
主要討論在 app router 使用情境
nextjs 提供多種 render page 的方式,當中最特別的是 server side rendering, 甚至 static page generation,對於網頁瀏覽速度大有助益。
紀錄一下 ~$ sudo more /etc/letsencrypt/options-ssl-apache.conf # This file contains important security parameters. If you modify this file # manually, Certbot will be unable to automatically provide future security # updates. Instead, Certbot will print and log an error message with a path to # the up-to-date file that you will need to refer to when […]
理論上大部分東西都不用更動
筆記一下,雖說以後有沒有機會用到還不曉得
記錄一下 fiber v2 + swagger
Vernemq 是個 open source 的 MQTT broker,以 open source solution 來說算是功能還蠻不錯的選擇,東南亞的獨角獸gojek也有在用這套mqtt solution。 最近有遇到一些問題,順便做點筆記
@cloudshell:~/kubernetes-engine-samples/php-test $ ls –recursive .: Dockerfile src ./src: conf html ./src/conf: php.ini ./src/html: index.php @cloudshell:~/kubernetes-engine-samples/php-test $ kubectl get po,svc -o wide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES pod/cd-jenkins-0 2/2 Running 0 3h2m 10.68.0.5 gke-test-k8s-cluster-default-pool-280580a6-94ht pod/php-test-deploy-7fd75b6b4f-t9v2z 1/1 Running 0 5m58s 10.68.0.6 gke-test-k8s-cluster-default-pool-280580a6-94ht NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR service/cd-jenkins ClusterIP […]
情況是要把原本寫入 local mongodb 的 usage log dump 出 csv 檔案(並且從mongodb內刪除),並且把較舊的 csv 檔案移去 GCP storage。