This project is a mock implementation of a MySQL database using Prisma. It serves as a template for building applications that require a database connection and data modeling.
mysql-prisma-mock
├── prisma
│ └── schema.prisma # Defines the Prisma schema and data model
├── src
│ ├── index.ts # Entry point of the application
│ └── types
│ └── index.ts # TypeScript types and interfaces
├── .env # Environment variables for the application
├── .env.example # Template for the .env file
├── .gitignore # Files and directories to ignore in Git
├── package.json # npm configuration file
├── tsconfig.json # TypeScript configuration file
└── README.md # Project documentation
-
Clone the repository:
git clone <repository-url> cd mysql-prisma-mock
-
Install dependencies:
npm install
-
Configure environment variables:
- Copy
.env.exampleto.envand update the values with your MySQL database connection details.
- Copy
-
Run the application:
npm run start
- The application initializes a Prisma client and connects to the MySQL database defined in the
.envfile. - You can modify the
prisma/schema.prismafile to define your data models and relationships. - Use the
src/index.tsfile to set up any necessary database connections or mock data.
Feel free to submit issues or pull requests to improve the project.
This project is licensed under the MIT License.