dialogflow-fullfiller v1.0.0
Documentation
Environment
Install the app on your computer
You must have installed on your computer :
- Git
- Github CLI
- Stripe CLI
- Postman and
- Postman CLI
- PostgreSQL
npm install stylus -g
- run
npm run setup
from your terminal to install all required packages. - Get an
.env
file from an admin of this app. - Make sure to have the Github CLI installed as we use
gh run watch
in the deployment script
Start the app
npm run start:watch
to start the app locally and enjoy the hot reload thanks to Nodemon.
npm start
to test the production build
lsof -ti tcp:3000 | xargs kill
if you need to kill other running apps on port 3000
Config files
package.json - Node main app config - npm depencies, local scripts, etc.
app.json - Heroku (our server) config file.
Nodemon.json - Nodemon is purely used locally to automatically restart the app when a file is modified.
jest.config.json - Jest is a unit test package.
ts.config.json - Typescript configuration file.
.prettierrc - Prettier configuration file for file formatting.
.github/workflows node.js.yml - Where Github workflows are written.
CRON JOBS
CRON jobs are triggered by a Heroku add-on here.
node fileLocation.js
Environment variables
Config variables are set in a local .env
at the root folder.
From this .env
var:
- A few variables are required in Github Secrets to make Github Actions work.
- Others are required in Heroku Config Vars both in staging and production.
If you modify, please update the .env.example file. using npm run regenerate-env-example
.
ENVIRONMENT
has three value: development
, staging
and production
DEBUG_MODE
has two string values: ON
or
OFF
- It will dislay log entries with debug
as severity. See the custom logger
heroku config --app APP_NAME_HERE
To display env vars on heroku through the CLI
Useful command lines
prettier --write .
Useful links
- Visual representation of our tech stack on Kumu.
7 months ago