Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

elecstore

Setup Instructions

Prerequisites

Before you begin, ensure you have the following installed:

Backend Setup

  1. Clone the repository:

    git clone git@github.com:irfanfandi/elecstore.git
    cd elecstore
  2. Navigate to the backend directory:

    cd backend
  3. Install dependencies:

    bun install
  4. Set up environment variables: Create a .env file in the backend directory and add the necessary environment variables. Example:

    DATABASE_URL=your_database_url
    PORT=your_port
    
  5. Run the backend server:

    bun run --watch src/index.ts

Frontend Setup

  1. Navigate to the frontend directory:

    cd frontend
  2. Install dependencies:

    bun install
  3. Run the frontend application:

    bun start

Running with Docker

  1. Build the Docker image:

    docker-compose build
  2. Run the Docker containers:

    docker-compose up

Prisma Commands

To run migrations and seed the database, use the following commands:

  1. Run migrations:

    bun run prisma migrate deploy
  2. Seed the database:

    bun run prisma db seed

Accessing the Application

  • The backend will be running on http://localhost:3000.
  • The Prisma Studio will be accessible at http://localhost:5555.
  • The frontend will be running on http://localhost:5173 (or the port specified in your frontend configuration).

Additional Notes

  • Ensure that the backend is running before starting the frontend.
  • For any issues, check the console for error messages and refer to the documentation for troubleshooting.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages