Create React project using the following command
npm create vite@latest project_name -- --template react
https://tailwindcss.com/docs/guides/vite
npm i -D react-router-dom
npm install react-slick
npm install slick-carousel
import "slick-carousel/slick/slick.css";
import "slick-carousel/slick/slick-theme.css";
npm install @reduxjs/toolkit
npm install react-redux
npm i dotenv
create a .env file to root of project directory
VITE_API_KEY =
Ignore the .env
file to .gitignore
Access the API key in your code
import.meta.env.VITE_API_KEY
npm install firebase
create firebase.jsx
file and copy firebaseConfig
from the firebase console
export const auth = getAuth(app);
npm install -g firebase-tools
firebase login
firebase init
1. Hosting: Configure files for Firebase Hosting and (optionally) set up GitHub Action
deploys
2. Use an existing project
3. What do you want to use as your public directory? dist
4.Configure as a single-page app (rewrite all urls to /index.html)? yes
5. Set up automatic builds and deploys with GitHub? No
firebase.json file created
firebase deploy
https://movies-finder-2024.web.app/