Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wellpinho/prisma
Estudando Prisma.io
https://github.com/wellpinho/prisma
Last synced: 7 days ago
JSON representation
Estudando Prisma.io
- Host: GitHub
- URL: https://github.com/wellpinho/prisma
- Owner: wellpinho
- License: mit
- Created: 2022-01-22T15:16:08.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-10T16:09:50.000Z (almost 3 years ago)
- Last Synced: 2024-12-22T15:11:57.793Z (2 months ago)
- Language: TypeScript
- Size: 13.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# prisma
Estudando Prisma.io## Clone this repo
```[email protected]:wellpinho/prisma.git```## after cloned use
```yarn```## 1: run project
```yarn dev```## 2: Prisma Studio
*prism studio is a tool that helps to visualize models and database tables*
```yarn prisma studio```## 3: access the url
*http://localhost:5555/## Docker install on Ubuntu 21.04
*Remove old version*
```sudo apt-get remove docker docker-engine docker.io containerd runc```*Update packages*
```sudo apt-get update```
```sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
```
```curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -```
```sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
```
```sudo apt-get update```*Docker Engine install*
```sudo apt-get install docker-ce docker-ce-cli containerd.io```*Test if Docker is installed*
```sudo docker run hello-world```*Insert user on Docker*
```sudo usermod -aG docker $USER```*Start Docker*
```sudo systemctl start docker.service```*Create a container*
```docker run -p 5432:5432 --name your-db-name -e POSTGRES_PASSWORD=your-db-password -d postgres```*Start and stop a container docker*
```
docker container start ID_DO_CONTAINER
docker container stop ID_DO_CONTAINER
```
*Remove a container id*
```docker container rm ID_DO_CONTAINER```## Prisma Client
*Models example*
```
model Modules {
id String @id @default(uuid())
name String @unique
description String
created_at DateTime @default(now())@@map("modules")
}
```
*create data table*
```yarn prisma migrate dev```
*model generate*
```yarn prisma generate```