Full-stack application combining LlamaIndex vector search with Neo4j knowledge graph (GraphRAG) for answering queries about Netflix marketing materials. Flask/Hypercorn backend with custom ReAct agent, React frontend. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
50 lines
No EOL
2 KiB
Markdown
50 lines
No EOL
2 KiB
Markdown
# Deployment Instructions
|
|
|
|
## Files to Deploy
|
|
Deploy all files from the `dist` directory to your server at the path `/netflix_chatbot/`.
|
|
|
|
## Changing the Backend URL
|
|
If you need to change the backend API URL:
|
|
|
|
1. Edit the `.env` and `.env.production` files to update the `VITE_BACKEND_URL` value
|
|
2. Or use the provided script: `./update-backend.sh` which will update the URL and rebuild the application
|
|
3. Then rebuild the application with `npm run build`
|
|
|
|
## Important Server Configuration
|
|
The application requires proper MIME type configuration to work correctly. Depending on your server type, use one of the following:
|
|
|
|
### Apache Server
|
|
Make sure the `.htaccess` file is included in your deployment. It contains:
|
|
- MIME type configurations
|
|
- URL rewrite rules for SPA routing
|
|
- CORS headers
|
|
|
|
### IIS Server
|
|
Make sure the `web.config` file is included in your deployment. It contains:
|
|
- MIME type configurations
|
|
- URL rewrite rules
|
|
- CORS headers
|
|
|
|
## Common Issues and Solutions
|
|
|
|
### JavaScript MIME Type Error
|
|
If you get an error like:
|
|
```
|
|
Loading module from "https://ai-sandbox.oliver.solutions/netflix_chatbot/assets/index-XXXXX.js" was blocked because of a disallowed MIME type ("text/html").
|
|
```
|
|
|
|
Check that:
|
|
1. Your server is serving .js files with the correct MIME type: `application/javascript`
|
|
2. The `.htaccess` or `web.config` file is properly uploaded and enabled
|
|
3. Your server allows URL rewriting and custom MIME types
|
|
|
|
### Authentication Issues
|
|
- Make sure the Microsoft authentication is set up correctly
|
|
- The redirectUri in the MSAL configuration should match your deployment URL
|
|
- Check that cookies and localStorage are enabled in the browser
|
|
|
|
### API Connection Issues
|
|
- The app expects the backend API to be accessible at the configured URL (default: `https://ai-sandbox.oliver.solutions/netflix_back_v2`)
|
|
- If you need to change the backend API URL, follow the instructions in "Changing the Backend URL" section above
|
|
- In development, API calls are proxied through Vite's development server
|
|
- In production, API calls go directly to the configured backend URL |