Skip to content

Commit

Permalink
Use relative paths for assets during build
Browse files Browse the repository at this point in the history
  • Loading branch information
steinbro committed Jun 30, 2024
1 parent 0a0a8a3 commit 230b65b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ To use a location other than what's reported by your device, include the latitud
```
npm ci && npm run build && npm run serve-tiles
```
The app should now be running and accessible over HTTP from a web browser at http://127.0.0.1:8080/
2. To see it from your phone
Once the server is running,
```
ngrok http http://127.0.0.1:8080/
```
2. For the app to work properly from your phone, you'll need to serve it over HTTPS. The easiest way to do this is via a tunnel, such as:
a. ngrok: `ngrok http http://127.0.0.1:8080/`
b. [Microsoft Dev Tunnels](https://learn.microsoft.com/en-us/azure/developer/dev-tunnels/overview): `devtunnel host -p 8080`
c. Many other [tunneling options](https://github.com/anderspitman/awesome-tunneling?tab=readme-ov-file)
## Third-party libraries used
1. [Turf.js](https://turfjs.org/) (for GeoJSON processingand geospatial calculations)
Expand Down
3 changes: 3 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ import { defineConfig } from 'vite';

export default defineConfig({
root: './src',
// Use relative paths for assets, since our Github Pages deploy is not at the root
base: './',
build: {
outDir: '../dist',
minify: false,
emptyOutDir: true,
rollupOptions: {
// Build both the main site and the activity simulator as separate pages
input: {
index: './src/index.html',
replay_gpx: './src/replay_gpx.html',
Expand Down

0 comments on commit 230b65b

Please sign in to comment.