Deployment Guide
Deploying your Stratox project is straightforward. This guide will walk you through building your project and deploying it to popular services like GitHub Pages, Netlify, Vercel and more.
Building Your Stratox Project
To build your Stratox project, run the following command in your terminal:
This command will compile your app and output the static files into a directory named dist
located in your project's root directory. These files are ready to be deployed to a hosting service of your choice.
Deploying to GitHub Pages
GitHub Pages is a free hosting service that lets you host static websites directly from your GitHub repository.
Steps:
Initialize a Git Repository (if you haven't already):
Create a
gh-pages
Branch:Copy the
dist
Contents to the Root:Replace the contents of your repository with the built files:
Commit and Push to
gh-pages
Branch:Configure GitHub Pages:
Go to your repository on GitHub.
Navigate to Settings > Pages.
Under Source, select the
gh-pages
branch.Click Save.
Access Your Deployed App:
Your app will be available at:
Deploying to Netlify
Netlify is a popular platform for deploying static websites with continuous deployment and other powerful features.
Steps:
Create a Netlify Account:
Sign up at netlify.com.
Install Netlify CLI (optional but recommended):
Login via CLI:
Initialize Your Site:
Choose to create & configure a new site.
Select the team (usually your username).
Provide a site name (optional).
Set the deploy path to
dist
.
Deploy Your Site:
Access Your Deployed App:
Netlify will provide a URL where your app is deployed.
Deploying to Vercel
Vercel offers a seamless experience for deploying static sites and serverless functions.
Steps:
Install Vercel CLI:
Login to Vercel:
Deploy Your Project:
When prompted, set the output directory to
dist
.
Configure Project Settings (if needed):
You can adjust settings in the
vercel.json
file.
Access Your Deployed App:
Vercel will provide a URL where your app is deployed.
Deploying to Other Services
The dist
folder contains all the static files needed to run your app. You can deploy these files to any static hosting service, such as:
Amazon S3 and CloudFront
Firebase Hosting
GitLab Pages
Surge.sh
General Steps:
Sign Up for the Service:
Create an account on your chosen hosting platform.
Upload the
dist
Folder:Use the platform's interface or CLI tools to upload your static files.
Configure Domain and Settings:
Set up any necessary configurations, such as custom domains or SSL certificates.
Access Your Deployed App:
Your app should now be live at the URL provided by the hosting service.
Conclusion
Deploying your Stratox project is as simple as building your app and uploading the contents of the dist
folder to your preferred hosting service. With platforms like GitHub Pages, Netlify, and Vercel, you can have your app live in just a few minutes.
If you encounter any issues during deployment, consult the documentation of the hosting service or reach out to the Stratox community for support.
Last updated