Deployment
Build and deploy your AuroraMC store to production.
Deployment
AuroraMC compiles to a fully static website — plain HTML, CSS, and JavaScript files. No server-side runtime is required. You can host it on any platform that serves static files.
Building for Production
Run the build command from the project root:
npm run buildThis generates a dist/ folder with your optimized production files. You can preview the build locally before deploying:
npm run previewDeploying to Vercel
Vercel is the easiest option with automatic deployments from Git.
- Push your project to a GitHub, GitLab, or Bitbucket repository
- Go to vercel.com/new and import your repository
- Vercel will auto-detect the Vite framework. Verify the settings:
- Build Command:
npm run build - Output Directory:
dist
- Build Command:
- Add your environment variable:
- Name:
VITE_TEBEX_PUBLIC_TOKEN - Value: Your Tebex public token
- Name:
- Click Deploy
Every push to your main branch will trigger an automatic rebuild and deploy.
[!IMPORTANT] Environment variables prefixed with
VITE_are embedded into the build at compile time. You must add them in Vercel's dashboard before deploying, not after.
Deploying to Netlify
Netlify works similarly to Vercel.
- Push your project to a Git repository
- Go to app.netlify.com and click New site from Git
- Connect your repository and configure:
- Build Command:
npm run build - Publish Directory:
dist
- Build Command:
- Go to Site Configuration → Environment Variables and add
VITE_TEBEX_PUBLIC_TOKEN - Trigger a new deploy
SPA Redirect Rule
Since AuroraMC uses client-side routing, you need to add a redirect rule so that direct URL visits (like /terms or /success) don't return 404 errors.
Create a public/_redirects file:
/* /index.html 200This tells Netlify to serve index.html for all routes, letting React Router handle the navigation.
Deploying to Cloudflare Pages
- Go to dash.cloudflare.com → Workers & Pages → Create application → Pages
- Connect your Git repository
- Configure:
- Build Command:
npm run build - Build Output Directory:
dist
- Build Command:
- Add
VITE_TEBEX_PUBLIC_TOKENas an environment variable - Deploy
Cloudflare Pages automatically handles SPA routing, so no extra redirect configuration is needed.
Deploying to Traditional Web Hosting
If you use shared hosting (cPanel, Plesk) or a plain web server (Apache, Nginx):
- Run
npm run buildlocally - Upload the contents of the
dist/folder to your web root (usuallypublic_html/) - Configure your web server to serve
index.htmlfor all routes
Apache (.htaccess)
Create a .htaccess file in your web root:
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]Nginx
Add this to your server block:
location / {
try_files $uri $uri/ /index.html;
}Deploying to GitHub Pages
- Install the GitHub Pages deploy package:
npm install -D gh-pages- Add a deploy script to
package.json:
"scripts": {
"deploy": "gh-pages -d dist"
}- If your repository name is not
username.github.io, set the base path invite.config.ts:
export default defineConfig({
base: '/your-repo-name/',
// ...
});- Build and deploy:
npm run build
npm run deploy[!WARNING] GitHub Pages does not natively support SPA routing. Direct links to routes like
/termswill return 404. To work around this, you can add apublic/404.htmlfile that redirects toindex.html, or use a hash-based router instead.
Environment Variables Checklist
Before deploying, make sure your environment is configured:
| Variable | Required | Where to Set |
|---|---|---|
VITE_TEBEX_PUBLIC_TOKEN | Yes | .env locally, hosting dashboard for production |
Since AuroraMC is a static site, environment variables are baked into the JavaScript bundle at build time. There is no runtime .env file — the values are read during npm run build and embedded into the output.
If you change your Tebex token, you must rebuild and redeploy.