-
Replace
myfunctionin express-typescript.yml with your function name.
NOTE: Must be unique in the namespace -
Implement logic in
handlers/index.ts
NOTE: you can delete sample fileshandlers/web.ts,handlers/me.tsandhandlers/process.ts -
Any asset (non-ts file) create and reference from the
static/folder
NOTE: you can deletestatic/index.html
Register Cotalker NPM Registry:
npx npm-login-noninteractive -r https://npm.pkg.github.com -u github_user -p github_token -e github_email
npm config set @cotalker:registry https://npm.pkg.github.com
Add Cotalker libraries:
npm install --save @cotalker/lib-cotalker-models
npm install --save @cotalker/lib-cotalker-api
For a list of available Cotalker packages please visit: https://github.com/orgs/Cotalker/packages
npm ci
npm run build && node dist/template
Test:
curl http://localhost:3300
npm ci
npm run build && npm run faas:build
npm run deploy:[staging | production] -- --build-arg REGISTRY_USER=github_user --build-arg REGISTRY_TOKEN=github_token --build-arg REGISTRY_EMAIL=github_email
Test:
curl http://localhost:8080/function/myfunction