Skip to content

Commit

Permalink
Add an example .env file and update the README
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronbrethorst committed Oct 17, 2024
1 parent 3dccee9 commit 0306e53
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 18 deletions.
10 changes: 10 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
PUBLIC_OBA_REGION_NAME="Puget Sound"
PUBLIC_OBA_SEARCH_ENABLED=true
PUBLIC_OBA_SERVER_URL="https://api.pugetsound.onebusaway.org/"
PUBLIC_OBA_REGION_CENTER_LAT=47.60728155903877
PUBLIC_OBA_REGION_CENTER_LNG=-122.3339240843084
PUBLIC_OBA_GOOGLE_MAPS_API_KEY=""
PRIVATE_OBA_API_KEY="test"
PUBLIC_OBA_LOGO_URL="https://onebusaway.org/wp-content/uploads/oba_logo-1.png"
PUBLIC_OBA_MAP_PROVIDER="osm"
PUBLIC_NAV_BAR_LINKS={"Home": "/","About": "/about","Contact": "/contact","Fares & Tolls": "/fares-and-tolls"}
37 changes: 19 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
# create-svelte
# OneBusAway WebApp

Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte).
This is the next-generation OneBusAway web application, built on top of [SvelteKit](https://kit.svelte.dev). It is designed to replace the [onebusaway-enterprise-webapp](https://github.com/OneBusAway/onebusaway-application-modules) project. This project is under active development!

## Creating a project

If you're seeing this, you've probably already done this step. Congrats!
## Developing

```bash
# create a new project in the current directory
npm create svelte@latest

# create a new project in my-app
npm create svelte@latest my-app
npm install
cp .env.example .env
# edit .env with your editor of choice
npm run dev
```

## Developing
## `.env` File Keys

Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
See `.env.example` for an example of the required keys and values.

```bash
npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open
```
- `PUBLIC_OBA_REGION_NAME` - string: displayed in the header.
- `PUBLIC_OBA_LOGO_URL` - string: The URL of your transit agency's logo.
- `PUBLIC_OBA_SEARCH_ENABLED` - boolean: whether the search APIs in newer OBA REST API versions are supported.
- `PUBLIC_OBA_SERVER_URL` - string: Your OBA API server's URL.
- `PUBLIC_OBA_REGION_CENTER_LAT` - float: The region's center latitude.
- `PUBLIC_OBA_REGION_CENTER_LNG` - float: The region's center longitude.
- `PUBLIC_OBA_GOOGLE_MAPS_API_KEY` - string: Your Google API key. Leave this blank if you don't have one.
- `PRIVATE_OBA_API_KEY` - string: Your OneBusAway REST API server key.
- `PUBLIC_OBA_MAP_PROVIDER` - string: Use "osm" for OpenStreetMap or "google" for Google Maps.
- `PUBLIC_NAV_BAR_LINKS` - JSON string: A dictionary of the links displayed across the navigation bar.

## Building

Expand Down

0 comments on commit 0306e53

Please sign in to comment.