This guide provides step-by-step instructions on how to set up and run your API using Docker Compose and visualize your data with Prisma Studio.
Prerequisites:
- Docker installed: https://www.docker.com/get-started
- Docker Compose installed: https://docs.docker.com/compose/install/
- Node.js and npm (or yarn) installed: https://nodejs.org/
1. Start the Database with Docker Compose:
-
Navigate to your project's root directory (where
docker-compose.yml
resides). -
Open a terminal window.
-
Run the following command:
docker-compose up -d
-
Run the API Development Server:
Navigate to the API folder within your project directory.
Open a terminal window in this directory. Run the following command to start the development server:
npm run dev
3.Visualize Data with Prisma Studio: While the API development server is running (from step 2), open a new terminal window.
Navigate to the root directory of your project (where docker-compose.yml resides).
Run the following command to launch Prisma Studio:
npx prisma studio