During the installation process, in the database section, if you follow the documentation and run the command:
npx prisma migrate dev --name init --skip-seed
You must then run the following command afterward:
npx prisma db seed
Before executing this command, you must ensure that you have set the STRIPE_PUBLIC_KEY and STRIPE_SECRET_KEY in the .env file, otherwise, it will throw an error in the seed.ts file.
Secondly, you need to delete all the products from the Stripe product list, otherwise, it won't create new products.
After running npx prisma db seed, it will create the admin account with the following credentials:
Username: [email protected]
Password: admin
It is recommended to do more description in documents about seed
It is recommended to separate the initialization process, including creating permissions and the admin account, from the product creation process. Place the initialization tasks in the seed command, while the product creation should be executed in a separate file.
great work,thanks