-
npm create vite@latest
- Name: client
- React
- JavaScript
npm install
- Tested running a script with
npm run dev
-
- Navigated into server/ directory
npm run init
npm install express --save
npm install firebase-admin
-
- Adjusted the App.jsx file for my own content instead of the default React + Vite page
npm run dev
to check what it looked likenpm run build
to build the optimized file
-
- Navigated to "Hosting"
- Clicked "Get Started"
npm install -g firebase-tools
firebase login
firebase init
- Chose "Hosting: Configure files for Firebase Hosting and (optionally) set up GitHub Action deploys"
- Use an existing project
- Chose my "connectplate" project
- Public directory:
client/dist
- Configure as single-page app:
yes
- Set up automatic builds and deploys with GitHub:
yes
- File already exists. Overwrite?
no
- Logged in to GitHub
- Chose my repository
- Set up the workflow to run a build script before every deploy:
yes
- What script should be run before every deploy:
npm ci && npm run build
- What is the name of the GitHub branch associated with your site's live channel:
main
firebase deploy
- Navigated to "Hosting" on firebase.com again
- Under Domains, clicked "Add custom domain"
- Entered
connectplate.com
- DNS record popped up, and I added them to Cloudflare