Login page Authenticate and input icon
This commit is contained in:
18
README.md
18
README.md
@@ -42,10 +42,26 @@ If your backend runs somewhere else, set `VITE_API_BASE_URL` in a local
|
||||
## Production build
|
||||
|
||||
```bash
|
||||
npm run build # outputs to dist/
|
||||
npm run build # outputs to dist/ - for the DEPLOYED site only
|
||||
npm run preview # serve the production build locally to sanity-check it
|
||||
```
|
||||
|
||||
`npm run build` loads `.env.production`, which pins `VITE_API_BASE_URL` to
|
||||
`https://mcp.nearle.ai.in`. That is right for the deployed site and wrong for
|
||||
anything you run locally, because the backend serves `frontend/dist` itself
|
||||
whenever that directory exists - so `http://localhost:8000` would hand you a
|
||||
page that sends `/api/auth/login` to the remote host and fails with "Could not
|
||||
reach the API" even though the local backend is up. For a build you intend to
|
||||
run locally, use:
|
||||
|
||||
```bash
|
||||
npm run build:unified # same optimised build, blank VITE_API_BASE_URL
|
||||
```
|
||||
|
||||
That leaves API calls relative, so they go back to whichever server delivered
|
||||
the page - port 8000 for the backend's single-port mode, or `npm run preview`,
|
||||
which proxies `/api/*` to `127.0.0.1:8000` the same way the dev server does.
|
||||
|
||||
## Pages
|
||||
|
||||
- `/` - Browse & Search (sidebar brand/category filters, product grid,
|
||||
|
||||
Reference in New Issue
Block a user