This is the website for IHS Electric, a Stratford Ontario-based electrical company. A node server and MailJet integration allows customers to send emails to the company via a web-based form.
Email forwarding is set up via CloudFlare to enable employees to receive emails at their @ihselectric.ca emails. MailJet allows employees to send email using their @ihselectric.ca emails by hooking up SMTP to their primary email.
- Define env variables for the frontend in a .env file (located in the root of this repository)
.env
VUE_APP_RECAPTHCA_SITE_KEY
BASE_URL
VUE_APP_BASE_URL
IHSELECTRIC_FRONTEND_IMAGE=ihselectric-front:latest
IHSELECTRIC_API_IMAGE=ihselectric-api:latest
IHSELECTRIC_SRV_BASE=/srv/ihselectric
The recaptcha key comes from Google (type v2 invisible). Make sure that your app's base URL is set as one of the valid domains for the key; localhost is fine for development.
- Define env variables for the API in api/.env
api/.env
MAILJET_APIKEY_PUBLIC
MAILJET_APIKEY_PRIVATE
These keys can be obtained from MailJet once you've signed up for an account, which offers (at the time of writing) 200 free emails/day or 6000/month.
- Build frontend and API docker containers
make
- Up the containers
docker-compose up -d
The website should be available at ${VUE_APP_BASE_URL}
. The API is available at ${VUE_APP_BASE_URL}/api
; try a GET
on the /api/healthcheck
endpoint.
npm install
npm run serve
npm run lint
npm run build
npm run test:unit