Steps
- [ ] First we need to setup the datamodel. The datamodel will allow us to define the types necessary to feed mongo what it needs to get setup in your Docker instance.
type Media {
id: ID! @id
title: String
year: String
rated: String
released: String
runtime: String
genre: String
director: String
writer: String
actors: String
plot: String
language: String
country: String
awards: String
poster: String
source: String
value: String
metascore: String
imdbRating: String
imdbVotes: String
imdbID: String
totalSeasons: String
response: String
}
type Playlist {
id: ID! @id
owner: User!
title: String! @unique
media: [Media]! @relation(link: INLINE)
}
type User {
id: ID! @id
email: String! @unique
password: String! @unique
username: String!
playlists: [Playlist]! @relation(link: INLINE)
}
- [ ] Once the datamodel is set all you need to do is launch docker. To do so we will need to go to server/prisma and run
docker-compose up -d
.
- [ ] Once our docker instance is up and running we will need to generate and deploy the prisma datamdel. to do so we will run
prisma generate