This guide covers various deployment options for the Discord Chat Exporter application.
First, build the production version:
npm run buildThis creates a build/ folder with optimized production files.
-
Connect Repository
- Go to Netlify
- Connect your GitHub repository
- Select the
discord-chat-exporter-appfolder
-
Build Settings
- Build command:
npm run build - Publish directory:
build - Node version:
18or higher
- Build command:
-
Environment Variables
- No environment variables needed for basic deployment
-
Deploy
- Netlify will automatically deploy on every push to master
-
Install Vercel CLI
npm i -g vercel
-
Deploy
vercel
-
Follow the prompts
- Select the
discord-chat-exporter-appfolder - Build command:
npm run build - Output directory:
build
- Select the
-
Install gh-pages
npm install --save-dev gh-pages
-
Add to package.json
{ "scripts": { "predeploy": "npm run build", "deploy": "gh-pages -d build" } } -
Deploy
npm run deploy
-
Upload Files
- Upload the entire
build/folder to your web server - Ensure the server supports single-page applications
- Upload the entire
-
Configure Server
- Set up URL rewriting for React Router
- Example Apache
.htaccess:RewriteEngine On RewriteBase / RewriteRule ^index\.html$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.html [L]
The application is configured for production by default. No additional environment variables are required.
- Netlify/Vercel: Use their domain management interface
- GitHub Pages: Configure in repository settings
- Custom Server: Update DNS records and server configuration
The application is already optimized for mobile devices with:
- Responsive design
- Touch-friendly interface
- Mobile-first CSS approach
- HTTPS: Always use HTTPS in production
- CORS: Configure if needed for your domain
- Content Security Policy: Consider adding CSP headers
- Performance: 90+
- Accessibility: 95+
- Best Practices: 90+
- SEO: 90+
npm install --save-dev source-map-explorer
npm run build
npx source-map-explorer 'build/static/js/*.js'- Ensure Node.js version is 16+
- Clear
node_modulesand reinstall - Check for TypeScript errors
- Verify build folder exists
- Check build command output
- Ensure proper file permissions
- Check browser console for errors
- Verify API endpoints are accessible
- Test with different browsers
For deployment issues:
- Check the GitHub Issues
- Review build logs
- Test locally first
Happy Deploying! 🎉