- Node v16+
- npm v7+
There are 2 project folders in this repo under 'apps':
- server: Express.js API
- client: Next.js website
Before continuing, run npm install
in both directories:
npm install
The following command will initialize the database, create the new tables, and seed the data. When asked for a name call it anything you'd like for instance, "init seed"
npm run prisma:reset
cp apps/client/.env.sample apps/client/.env
npm run dev:server
npm run dev:client
npm run dev
- Setup your GraphQL Server
- Define your schema
- Create your resolvers using your preferred methodology
- Setup your choice for GraphQL client
- Update existing API calls with GraphQL calls
- 🚢
The focus is on testing the CRUD actions on the server side of the application.
npm test
This will
- Execute Prisma Test then Server Test
- Prisma Test is going to do a couple things
dotenv -e .env.test -- npx prisma migrate reset --force
- setup a clean test.sqlite and seed it with data
- run all migrations on it
- Then after Prisma Test is complete
jest test
from the server directory is executed
The repo is broken down by tags
git checkout tags/v1.0 -b v1.0-branch
Is the inital project with tested REST api. ...git checkout tags/v2.0 -b v2.0-branch
Is the final, finished project with GRAPHQL implemented along side the REST API
TODO: Repo needs to be progressivly enhanced from v1.0 -> v2.0 for each moudle adding in the code and tests along with objectives to cover from the instructor docs. Starting with Commit cc783d701147d63a996c0f03eda48d9e2931797d is where gql deps are added and then work up the commits, and generate a tag v1.1
before moving onto the next modlue. (at least that was the general plan)