Code for the GiScience chat room application.
The user website is here.
- Java >= 17 installed and runnable in path, e.g. via SDKMAN
- Chrome browser installed and runnable in path
./gradlew build
java -jar web/build/libs/web.jar
The first build can take some time due to Chrome driver installation.
The website should now be accessible on http://localhost:8080
Preferences | Build, Execution, Deployment | Build Tools | Gradle | Build and Run using:
Gradle
This makes sure that the frontend is built and copied to the web apps resource folder.
- Node 19.1.0
- npm 8.19.3
- Chrome browser installed and runnable in path
cd frontend
npm install
npm run build
Install Karma CLI globally:
npm install -g karma-cli
Continuous test run on headless Chrome - watching file changes:
karma start
Single test run on Chrome:
karma start --single-run --browsers Chrome
Preferences | Languages & Frameworks | JavaScript | Code Quality Tools | ESLint | Automatic ESLint Configuration
This will show ESLint errors and warnings already in the editor.
- Heroku account.
- Local installation of Heroku CLI.
- Project has been created with
heroku create --stack heroku-22 -a gischat --no-remote
.
heroku plugins:install java
heroku login
./gradlew build
heroku deploy:jar web/build/libs/web.jar -a gischat
heroku logs --tail
Now the web app is accessible on https://gischat.herokuapp.com
Access Open API with https://gischat.herokuapp.com/swagger-ui.html
The app is automatically deployed on push. For a manual redeploy click "Deploy App" on https://github.com/jlink-workshop/gischat/actions
heroku logs -a gischat --tail
heroku restart -a gischat
You can switch on and off features by adding the following query parameter
to the app's URL: ?features=feature1,feature2
.
Leave the list empty to clear all feature toggles.
The state of a feature toggle is saved in the browser's local storage.
That's why you only have to add the features
query parameter once per browser.
Feature | Description | Default |
---|---|---|
pychatter |
Enables the Pychatter Bot Checkbox | off |