An educational web app for mapping the world, searching for places, and navigating around Seattle. The app is designed to highlight 3 components: Autocomplete, Priority Queues, and Seam Finding. See the Releases for instructions about each project component.
This project is pre-configured for IntelliJ IDEA.
- Install IntelliJ IDEA.
- Download or clone this project and open it in IntelliJ.
- Run the
MapServer
class to start the web app.
To see the map images, sign up for a free MapBox account to get an access token. Once you have your access token, in the IntelliJ toolbar, select the "MapServer" dropdown, Edit Configurations..., under Environment variables write TOKEN=
and then paste your token. Re-run the MapServer
class to launch the web app and enjoy the "Ice Cream" map style by Maya Gao.
One way to share Java apps is by distributing them as a JAR that bundles all your code together into a single file.
- Open IntelliJ. From the File menu, select Project Structure... and Artifacts from the sidebar.
- Press the + button to add a new JAR and select From module with dependencies.
- In the pop-up window, select MapServer as the main class and press OK.
- Edit the name from "huskymaps:jar" to "huskymaps" and press OK to close the project structure dialog.
- From the Build menu, select Build Artifacts and build huskymaps.
- Test your JAR by running it from the terminal. In IntelliJ, open the terminal, and run
TOKEN=... java -jar out/artifacts/huskymaps/huskymaps.jar
.
To deploy the app to the web, we'll share this JAR file with a web hosting provider such as fly.io. fly.io provides a free web hosting service where anyone can sign-up to deploy their apps to the internet at no cost (no payment method needed).
- Install flyctl and sign up.
- Start (but don't complete!) the process for deploying your application via Dockerfile. For the app name, use the name
huskymaps-
with your UW NetID after the dash. When it asks you to deploy, don't do so just yet! - Open the
fly.toml
file in a text editor and set theforce_https
option to false. - Share your MapBox access token with fly as an app secret with the terminal command
fly secrets set TOKEN=...
. - Finally, deploy the app with the terminal command
fly deploy
.