Introduction
On October 29, Prisma announced Prisma Postgres. Don't hesitate to read the blog, useful information! ๐
It is built from the ground up and deployed via unikernels (think: hyper-specialized OS) that are running as ultra-lightweight microVMs on our own bare metal servers.
Thanks to that architecture, weโre able to offer unique benefits that you donโt get anywhere else:
- A โserverlessโ database with pay-as-you-go pricing but no cold starts.
- A generous free tier that you can use to explore the service and build small projects.
- Thanks to the first-class integration with other Prisma products, you also get the following features out-of-the-box:
- Real-time database event streams
- Connection pooling
- Caching
- Query analysis and recommendations
Quick video presentation
How to use Prisma Postgres
Getting started: Get a new database
If you want, you have the Quickstart documentation about installing Prisma.
- Login into your Prisma Console account (it's free)
- Create a new project by clicking on the New project button
- Give it a beautiful name
- In the Prisma Postgres section, click to Get started
- Select a region, and click to Create project
- You now have your database ! ๐ฅณ
Setup your project
- Open your terminal
-
Execute this command if you want a template
npx try-prisma@latest --template databases/prisma-postgres --name hello-prisma --install npm
-
Install dependencies
thomasbnt@thomasbnt:~/lab$ npx try-prisma@latest --template databases/prisma-postgres --name beautiful-project --install npm Need to install the following packages: try-prisma@1.0.58 Ok to proceed? (y) y โ Loaded 59 templates โ Downloaded and extracted the databases/prisma-postgres project in ./beautiful-project. โ Installed packages in ./beautiful-project. The project is good to go! Next steps: 1. Navigate into ./beautiful-project to begin. 2. Refer to the project README for detailed instructions on running the project: https://github.com/prisma/prisma-examples/tree/latest/databases/prisma-postgres If you have any feedback about this specific template, we want to hear it! Submit any feedback here: https://pris.ly/prisma-examples-feedback thomasbnt@thomasbnt:~/lab$ cd beautiful-project/
Click on Generate database credentials and copying and pasting into your
.env
file in your project folder, but keep it private!
-
You can setup your database with a migration
npx prisma migrate dev --name init
Optional: If you want sample data:
npm run queries
You can now see your database with the
npx prisma studio
๐
Useful links
Note: Some links are affiliate links. I may receive a commission when you take a paid offer.
Top comments (0)