58 lines
1.3 KiB
Markdown
58 lines
1.3 KiB
Markdown
# Bay Area Affiliates
|
|
|
|
Vite/React marketing site for `bayareait.services`.
|
|
|
|
## Local
|
|
|
|
```bash
|
|
npm install
|
|
npm run dev
|
|
npm run dev:api
|
|
```
|
|
|
|
`npm run dev` starts the frontend on `http://127.0.0.1:3012`. Run `npm run dev:api` in a second terminal so the contact form can post to the local API on `http://127.0.0.1:3013`.
|
|
|
|
## Production build
|
|
|
|
```bash
|
|
npm run build
|
|
npm start
|
|
```
|
|
|
|
The production build regenerates `robots.txt` and `sitemap.xml`, runs Vite, prunes unused assets, and prerenders route HTML into `dist/`.
|
|
|
|
## Environment variables
|
|
|
|
```bash
|
|
AMAZON_USER=...
|
|
AMAZON_PASSWORD=...
|
|
CONTACT_TO_EMAIL=support@bayarea-cc.com
|
|
CONTACT_FROM_EMAIL=support@bayarea-cc.com
|
|
PORT=8080
|
|
```
|
|
|
|
`CONTACT_TO_EMAIL` and `CONTACT_FROM_EMAIL` are optional and default to `support@bayarea-cc.com`.
|
|
|
|
## Docker
|
|
|
|
```bash
|
|
docker compose up --build -d
|
|
```
|
|
|
|
The container serves the built site and the `/api/contact` endpoint on `http://127.0.0.1:8080`.
|
|
|
|
## Reverse proxy with host Caddy
|
|
|
|
```caddy
|
|
bayareait.services {
|
|
encode zstd gzip
|
|
reverse_proxy 127.0.0.1:8080
|
|
}
|
|
```
|
|
|
|
## Launch notes
|
|
|
|
- Static assets and the contact form endpoint are served by the Node app inside the container.
|
|
- SPA fallback is enabled while prerendered route folders still resolve directly.
|
|
- Claims such as `24/7`, `30+ local businesses`, and legal company details should be verified before launch.
|