Jeremy J McWilliams |
---|
![]() |
Full Stack Developer |
development
As a Traveler, I find that travel decisions are based upon finances.
I need an application to plan, organize, budget, and guide me on my trips.
Goal
Help a client make vacation decisions based on finances, organize itinerary, and add subscriptions for followers.
- Prisma2
- Auth0
- PostgreSQL
- GraphQL
- Apollo-server
- JsonWebToken
- Heroku
- Jest
- development
- testing
- production
ORM and more
- based on a data-model, prisma deploys/generates a query builder to a database. Works dynamically with GraphQL. Is able to generate graphql.schema files that can be imported into GraphQL server.
Docker-Compose
- for local development and testing.
RUN -
docker-compose -up -d
to establish docker environment for Prisma and PostgreSQL DB locally.
cd prisma
prisma deploy -e ../config/dev.env
prisma generate -e ../config/dev.env
prisma admin -e ../config/dev .env
prisma gui for tracking DB changescd ..
-to app root there--
yarn dev
- connects to the local prisma dev environment
Runs the app in the development mode.
Open http://localhost:4000 to view it in the browser.
-run queries and mutations (example)
mutation signUp($username: String!, $email: String, $password: String!) {
signUp(username: $username, email: $email, password: $password) {
__typename
... on SignUpResponse {
token
user {
id
username
email
}
}
... on UserFoundError {
message
}
}
}
add variables as object
{
"username": "JMac",
"email": "[email protected]",
"password": "Travel"
}
cd prisma
prisma deploy -e ../config/test.env
prisma generate -e ../config/test.env
prisma admin -e ../config/test.env
prisma gui for tracking DB changescd ..
-to app root there--
yarn test
- connects to the local prisma testing environment -runs 3 test suites to test resolvers
- setUp heroku account
- create prisma.io account for production
- setUp prisma server (will prompt to login to heroku)
- setUp database through prisma (postgres DB on heroku)
- setUp prisma service (also will connect to heroku)
- prisma init "identifying name for DB"
this will generate a new prisma folder, you only need the url in the prisma.yml*
- setUp .env file with
- PRISMA_ENDPOINT=url
- JWT_SECRET=IsItSecret?!
optional
- setUp config/prod.env follow instructions for development, except now with prod.env
yarn start
- connects to prisma.io account for production Open http://localhost:4000 to view it in the browser.