Free Games Catcher is an application that aims to search for game sites, trigger an alert and send it to users to notify them when a free game is available.
To run the Free Games Catcher application locally, you need to:
This application needs some environment variables to provide all its features.
If you are using Visual Studio Code, the application provide launch configuration contained into
.vscode
directory, that automatically scrap a.env
file in the root application directory.
.env
example:
# Application version
VERSION="development"
API_URL="https://XXX.XXX.XXX" # URL of the API
API_KEY="XXX-XXX-XXX" # API key to access to the API, checked by default on all routes
# SMTP
# Used to send email notification
SMTP_HOST="XXX.XXX.XXX"
SMTP_PORT="XXX"
SMTP_USER="[email protected]"
SMTP_PASSWORD="XXX"
# DKIM
# Used to sign email notification
DOMAIN_NAME="XXX.XXX" # Domain name of the application
DKIM_SELECTOR="XXX.XXX"
DKIM_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\n XXX \n-----END RSA PRIVATE KEY-----"
# GOOGLE CREDENTIALS
# Used to store and retrieve application information
GOOGLE_USERNAME="[email protected]"
GOOGLE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n XXX \n-----END PRIVATE KEY-----"
# ELASTIC APM
# Used to use the Elastic APM service
ELASTIC_APM_SERVER_URL="https://XXX.XXX.XXX"
ELASTIC_APM_AGENT_KEY="XXX"
yarn install
yarn run dev
This command starts a local development server. Most changes are reflected live without having to restart the server.
yarn run build
This command generates static content into the build
directory and can be served using any static contents hosting service.
yarn run start
Free Games Catcher is using Discord webhook to send notifications.
To use the webhook, you need to create a webhook in your Discord server, then a POST
to the webhook URL will send a message to the Discord channel.
- Webhook documentation.
- Embed object documentation (the
embeds
field of the webhook request body, to create some embedded rich message content).
Free Games Catcher is using semantic-release and the semantic gitmoji extension.
.releaserc.js
that contains semantic-release configuration.- If semantic-release determine that there is a new released version, the
"@semantic-release/exec", { publishCmd: "echo ::set-output name=nextVersion::${nextRelease.version}", }
will output the next release version. - This variable is retrieved by the CI/CD in the release job:
outputs.version: ${{ steps.version.outputs.nextVersion }}
- The CD deploy job will set the
VERSION
image variable environnement to the next release version output. - If the application is running in
production
mode, then this is theVERSION
variable environnement that will print and provide the application version ; instead of the version field contained in thepackage.json
file.