1.0.0 • Published 7 months ago

dialogflow-fullfiller v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
7 months ago

Documentation

Environment

Install the app on your computer

You must have installed on your computer :

  1. run npm run setup from your terminal to install all required packages.
  2. Get an .env file from an admin of this app.
  3. 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:

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.