There are now better Canvas / Google meet integrations than then "LTI Google Meet" application we built here, including an official one from Canvas. This served its purpose during the initial months of the COVID-19 pandemic.
- In your Terminal or Command Prompt, run the following at the root of the project directory:
$ npm i
- Replace the example favicon.png and logo.svg in the
/src/main/branding
with your own favicon and logo
- Create a .env file, by renaming the provided sample
- Set the environment variable values to your .env file
In your Terminal or Command Prompt, run the following at the root of the project directory to run the server, which will expose an API and call Aleks whenever accessed:
$ npm start
In your Terminal or Command Prompt, run the following at the root of the project directory to run the tests:
$ npm test
In your Terminal or Command Prompt, run the following at the root of the
directory to build the server and tag it lti-googlemeet
:
$ docker build --tag lti-googlemeet .
In your Terminal or Command Prompt, run the following to run the server, which will expose an API on port 3000 and call Aleks whenever accessed if you have the current .env file:
$ docker run -t -p 3000:3000 --env-file ./.env lti-googlemeet
Or run the following in Terminal/Command Prompt to define custom environment variable(s)
$ docker run -p 3000:3000 -e DB_TYPE=type -e HOSTNAME=host -e DATABASE=db -e USER=user -e PASS=pass -e GCAL_CLIENT_EMAIL=gcal_client_email -e GCAL_PRIVATE_KEY=gcal_private_key -e GCAL_CALENDAR_USER=gcal_calendar_user -e GCAL_CALENDAR_ID=gcal_calendar_id chapel-server
Log in to DEV OpenShift:
$ oc login https://master.sysdev.ose.apu.edu:8443
Deploy definitions to DEV Openshift:
$ ansible-playbook ./ansible/deploy-to-ose.yml -i ansible/inventories/development.yml
Then, build/deploy from your Terminal or Command Prompt:
$ oc start-build lti-googlemeet
Or, build/deploy from the Openshift GUI
From your browser, or an application such as Postman, you can hit the following endpoints:
Summary: Redirect the user to the appropriate Google Meet URL, if a URL exists Description: Redirects the user to the Google Meet, if the Google Meet has been created, otherwise an HTML file is sent explaining to the user the Google event has not been created yet
None
- Status Code: 200
- Description: Not ready, needs authorization
- Status Code: 301
- Description: Redirect to Google Meet
- Status Code: 400
- Description: Class Code not specified
Summary: oAuth redirects here Description: After a successful authorization, Google should redirect the user to this endpoint. Furthermore, this endpoint will create the calendar event, save it to the database and return the Google Meet link
- Description: Authorization code coming from Google
- Required: true
- Data Type: string
- Description: State of the redirect from Google
- Required: false
- Data Type: string
- Status Code: 301
- Description: Redirect to Google Meet
Summary: Returns LTI configuration XML Description: Returns LTI configuration XML
None
- Status Code: 200
- Description: Returns the XML configuration to be used by Canvas when creating the LTI in Canvas
Summary: receive a pong response from the server Description: By going to the ping endpoint, the server will send pong if the request is successful
None
- Status Code: 200
- Description: receive 'pong' from the server
In your Terminal or Command Prompt, run the following at the root of the project directory:
$ node src/main/utils/yamlToMD.js
This command looks for all YAML OpenAPI files within the project and prints to the console the endpoints in a markdown format, which you can then copy/paste to your own markdown file.