Skip to content

Installation

hanan o edited this page May 2, 2024 · 5 revisions

Installation

Follow these steps to set up the project on your local machine:

Prerequisites

  • Node.js (v18.x or higher)
  • npm (v8.x or higher)
  • MongoDB (v7.x or higher)

Steps

  1. Clone the Repository

    git clone https://github.com/SeattleColleges/belindas-closet-nextjs.git
  2. Navigate to Project Directory

    cd belindas-closet-nextjs
  3. Install Dependencies

    npm install
  4. Environment Variables

    • Create an .env file in the root directory and paste the following:
      MONGODB_URI=<replace-with-your-connection-string>/<replace-with-name-of-db>
      NEXTAUTH_URL=http://localhost:3000
      NEXTAUTH_SECRET=secret
      JWT_SECRET=secret
      JWT_EXPIRES="1d"
      PRODUCT_KEY=secret
    • Update the variables in .env as per your local setup
  5. Database Setup

    • Start your MongoDB instance
    • Update MONGODB_URI in .env to use your connection string and name of database
    • Update JWT_SECRET in .env
    • Update JWT_EXPIRES in .env
  6. Run the Application

    npm run dev

Your application should now be running at http://localhost:8080.

Clone this wiki locally