-
Navigate to the Backend Directory:
cd backend
-
Install Dependencies:
Install all the necessary Node.js packages by running:
npm install
-
Configure the Environment Variables:
-
Update the
.env
file: Add your database connection string to the.env
file. It should look something like this:DATABASE_URL="your-database-connection-string"
-
Update the
wrangler.toml
file: Configure thewrangler.toml
file with your compatibility date and environment variables. Here’s an example of how it should look:compatibility_date = "2024-08-21" [vars] DATABASE_URL = "your-connection-pool-string" JWT_SECRET = "your-jwt-secret"
-
-
Set Up Prisma:
Initialize and apply your Prisma schema migrations:
npx prisma migrate dev --name init_schema
Generate the Prisma client:
npx prisma generate --no-engine
-
Start the Backend Server:
Run the development server:
npm run dev
-
Test Your Backend:
Import the
medium.postman_collection
file into Postman to test your backend endpoints.
-
Navigate to the Frontend Directory:
cd frontend
-
Install Dependencies:
Install all necessary Node.js packages for the frontend:
npm install
-
Start the Frontend Server:
Run the frontend development server:
npm run dev