This repository contains the backend server for an e-commerce application built with Express.js and Firestore.
- Node.js
- npm or yarn
- Firebase account
- Clone the repository:
git clone https://github.com/4human-org/murphy-ecommerce-backend.git
- Navigate to the project directory:
cd ecommerce-backend
- Install dependencies:
npm install
- Set up your Firebase Firestore:
- Go to the Firebase Console
- Create a new project or use an existing one
- Navigate to Project settings > Service accounts
- Generate a new private key and download the JSON file
- Create a .env file in the root of the project directory and add the following environment variables from your firebase service account keys:
FIREBASE_PROJECT_ID=murphy-development
FIREBASE_PRIVATE_KEY= # Insert your private key here
FIREBASE_CLIENT_EMAIL= # Insert your client email here
- Make sure the Firestore database is configured correctly.
Start the server with the following command:
nodemon app.mjs