brew tap prisma/prisma
brew install prisma
docker-compose up -d
- Prisma running on http://localhost:4466
- Prisma is connected to a local MySQL database (mysql://)
- Currently unprotected
- Set the
managementApiSecret
property to be protected securely
- Set the
prisma init --endpoint http://localhost:4466
# Create 2 files
prisma.yml
: Prisma service definitiondatamodel.prisma
: GraphQL SDL-based datamodel (foundation for database)
prisma deploy
# model -> ddl
prisma generate
# generate files under specified in prisma.yml (./generated/prisma-client)
// index.js
// yarn add prisma-client-lib
node index.js
[
{
id: 'cksg78f2j00120839i1gnxjvf',
name: 'Alice',
email: 'alice@Wonderland.com'
}
]
- Apple M1 issues => try from other architecture environment
- Database synchronize is not working properly
# try delete first, and deploy
prisma delete
prisma deploy