runtime-nodejs
is the application service engine of laf
, responsible for:
- The execution of the cloud function
- Database access proxy
- Node.js
- Express web framework
- Kubernetes basic use
- Telepresence for local development
- MongoDb basic use
- laf cluster installed locally or remotely (~/.kube/config)
- telepresence installed (see https://www.telepresence.io/reference/install)
- a running app in laf cluster (appid)
cd runtimes/nodejs
# connect the cluster if not connected
telepresence connect
export APPID=your-app-id
# proxy app cluster traffic to local, replace `APPID` with your prepared appid
telepresence intercept $APPID -n $APPID -p 8000:8000 -e $(pwd)/.env
# after intercept command, you can use following command to check if intercept active
telepresence list -n $APPID
# Start local service first, required nodejs version >= 18.0.0
npm install
npm run build
npm start
Clean up
telepresence leave $APPID-$APPID
telepresence helm install
failed forarm64 / Apple Chip
cluster, please upgrade your telepresence tov2.11.1
or later.