This app provides following functionality
- Allows clients to SignUp and SignIn
- Allows authenticated clients to Fetch their profile
- Allows authenticated clients to create, update and delete their post
- Allows client to fetch all the
published
posts and authenticated users to fetch all of their posts - Allows clients to comment on a post
- Pagination Support
- Sorting Support
Hosted via Prisma Cloud and Heroku
- GraphQL (using graphql-yoga)
- Prisma
- Prisma Cloud
- JWT
-
Launch Prisma and database
- Create a
.env
file underprisma
folder with following environment variables
POSTGRES_HOST=<postgres-hostname> POSTGRES_DATABASE=<postgres-database> POSTGRES_USER=<postgres-user> POSTGRES_PASSWORD=<postgres-password>
cd prisma
- Starting Container:
docker-compose up -d
- Stopping Services:
docker-compose stop
- Killing Container:
docker-compose kill
- Removing Stopped Containers:
docker-compose rm
- Create a
-
Deploy the prisma Datamodel. From inside
prisma
folder run- Dev:
prisma deploy -e ../config/dev.env
- Test:
prisma deploy -e ../config/test.env
- Prod:
prisma deploy -e ../config/prod.env
- Dev:
-
Install the node dependencies
npm install
-
Generate the Schema Dependencies
- Run
npm run get-schema
- Run
-
Run the App
- DEV:
npm run dev
- TEST:
npm run test
- DEV:
- This project was built as a part of The Modern GraphQL Bootcamp (with Node.js and Apollo) Udemy course by Andrew Mead