In this lesson you write initial boilerplate for prisma (spoiler: it's not bigger than this summary) with typescript infrastructure.
Dimitri Ivashchuk: [0:00] To start our Prisma project we need to install a couple of development dependencies. Let's do yarn @ and expand this snippet. Prisma CLI allows us to generate and instantiate the Prisma projects, TypeScript and ts-node allow us to write and execute typescript files, and @types/node contains the type definitions for Node.js.
[0:25] Let's install the dependencies. In the meantime, we can create the file tsconfig.json where we will specify our configuration for TypeScript. That's it. Let's save it.
[0:45] You can read more about the compiler options object at TypeScript docs under the compiler options, but just note that we can use the most more than features with ESNext and we set the strict mode that means that we enable the strict options for typechecks.
[1:07] We are finally ready to write some Prisma code. Let's do npx prisma init. It has been executed successfully. Let's see what we have got here. We have schema.prisma file with our database connection and the [inaudible] we need for generating the client and .ini file which we use to provide the database connection string to connect to our postgres database.
Member comments are a way for members to communicate, interact, and ask questions about a lesson.
The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io
Be on-Topic
Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.
Avoid meta-discussion
Code Problems?
Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context
Details and Context
Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!