This is a simple community-driven gratitude journal I built to help teach myself Vue and Tailwind CSS.
Anonymously post something you feel grateful for today and look at other entries submitted by fellow grateful users.
- Vue 3
- Vue Router
- Firebase
- Vite
- Tailwind CSS
- Clone this repository
- In your terminal,
cd
into the directory where you cloned this repository - Install dependencies - in your terminal, run
npm install
- Create a Firebase app
- In your Firebase app, create a Realtime Database
- Within the
/src
folder of the project directory, createfirebaseConfig.js
// firebaseConfig.js
import { initializeApp } from 'firebase/app';
const firebaseConfig = {
// your Firebase config details here
};
// Initialize Firebase
const firebase = initializeApp(firebaseConfig);
const database = getDatabase(firebase);
export default database;
- Within the root folder of the project directory, create a
.env
file - Within the
.env
file, create an environment variable calledVITE_FIREBASE
and store the API key from your Firebase config in it
VITE_FIREBASE=1234 # your actual Firebase API key here
- Within
firebaseConfig.js
, replace your API key withimport.meta.env.VITE_FIREBASE
// firebaseConfig.js
const firebaseConfig = {
apiKey: import.meta.env.VITE_FIREBASE,
// The rest of your config here
};
- Within your terminal, run
npm run dev
to run the app on your local server