https://medium.com/@shaibenshimol/nestjs-and-mysql-in-10-minutes-711e02ec1dab
ormconfig.json { "type": "mysql", "host": "localhost", "port": 3306, "username": "root", "password": "root", "database": "my_nestjs_project", "entities": ["src/**/**.entity{.ts,.js}"], "synchronize": true, "extra": { connectionLimit: 10, ... } } Very Important !! app.module
import { Module } from '@nestjs/common'; import { UsersModule } from './users/users.module'; import { TypeOrmModule } from '@nestjs/typeorm'; @Module({ imports: [ TypeOrmModule.forRoot(), UsersModule ], }) export class AppModule {} =====nest command can use or not=====
nest g module users nest g service users nest g controller users nest g class users/user.
https://sueboy.blogspot.com/2019/01/ingress-nginx-kubernetes-ingress-with.html
Real site is https://kubernetes.github.io/ingress-nginx/deploy/
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/mandatory.yaml Verify installation https://kubernetes.github.io/ingress-nginx/deploy/#verify-installation
kubectl get pods --all-namespaces -l app.kubernetes.io/name=ingress-nginx --watch Detect installed version https://kubernetes.github.io/ingress-nginx/deploy/#detect-installed-version
shell script POD_NAMESPACE=ingress-nginx POD_NAME=$(kubectl get pods -n $POD_NAMESPACE -l app.kubernetes.io/name=ingress-nginx -o jsonpath='{.items[0].metadata.name}') kubectl exec -it $POD_NAME -n $POD_NAMESPACE -- /nginx-ingress-controller --version =========
Other nginx-ingress https://kubernetes.github.io/ingress-nginx/deploy/#using-helm
https://www.digitalocean.com/community/tutorials/how-to-create-a-kubernetes-cluster-using-kubeadm-on-debian-9
https://medium.com/taipei-ethereum-meetup/%E4%BB%A5%E5%A4%AA%E5%9D%8A%E7%A7%81%E7%B6%B2%E5%BB%BA%E7%AB%8B-%E4%B8%80-43f8677fc9f8
如果要組成一個私人網路,同樣按照上面的流程建立其他節點。如果沒有下–nodiscover參數的話,最後節點應該會找到彼此。如果有下的話就必須用手動的方式加入其他節點,加入的方式有三種:
一是在geth指令加入–bootnodes參數;
二是進到console裡使用 admin.addPeer();
三是存成static-nodes.json檔,讓geth自動連線。
不管是使用哪一種,我們都要先知道要連到
static-nodes.json 裡面使用domain,可能會有問題,要自行更換ip
Example: geth --data ~/data cp static-nodes.json ~/data/geth/static-nodes.json static-nodes.json like this [ "enode://53999cc519079c5190798b1114bd16a05a8d5190796cc51907988a4e80ebda7b6c519079e56b0b161da3475c4dc62f6b51907967a6e327e46aa56329c519079f@192.168.0.10:30303" ]
https://www.tecmint.com/nginx-web-server-security-hardening-and-performance-tips/?fbclid=IwAR3WRK-N-buun8QIMDUbzes72-w6p8SKCxnzr0sGU_PFAyudPRbHiumtFu0
https://www.tecmint.com/nginx-web-server-security-hardening-and-performance-tips/?fbclid=IwAR3WRK-N-buun8QIMDUbzes72-w6p8SKCxnzr0sGU_PFAyudPRbHiumtFu0
Jest Expect Methods https://jestjs.io/docs/en/expect
it = test
it('count > 30', async () => { await reqTarget.get("/members").expect(200) .then((res) => { //Can use foreach, more easy for(key in res.body){ //console.log(res.body\[key\].cou ); if (res.body\[key\].cou > 100) throw new Error("count: "+res.body\[key\].cou +" > 30"); //for vars value check message expect(res.body\[key\].cou ).toBeLessThan(30); } }); });