##Setting up the project
- Install and run a redis server:
sudo apt-get install redis-server
redis-server --daemonize yes
cd myApp
- Run sapper:
cd sapper
- Install npm dependencies:
npm install
- Run:
npm run dev
- Verify it's running by going to
http://localhost:3000
- Start the Prisma server
- Install prisma:
npm install -g prisma
- Make sure docker is set up (follow the instructions on their website)
cd db
- Install npm dependencies:
npm install
- Start docker:
docker-compose up -d
- If working with
Docker Desktop
on Windows 10 PRO useendpoint: http://localhost:4466
in prisma.yml. If using Toolbox or prisma doesn't connect useendpoint: http://192.168.99.100:4466
- If working with
- Deploy and generate prisma:
prisma deploy; prisma generate
- Install database dependencies:
npm install
- Start the GraphQL server:
node index.js
- Verify prisma is running by going to
http://localhost:4000
(you should see a GraphQL playground)- You can now also go to
http://localhost:4466
to access the internal prisma GraphQL playground - You can access the prisma admin panel at
http://localhost:4466/_admin
- You can now also go to
- Install prisma:
This is the guideline to run the test on Cypress More information please check: https://docs.cypress.io/guides/getting-started/installing-cypress.html#System-requirements
-
Install cypress:
cd <projet>/app/sapper
npm install cypress –save-dev
-
Open Cypress:
./node_modules/.bin/cypress open
Then cypress is openIf you cannot open it, try a direct download: https://download.cypress.io/desktop unzip the file to local pc and double click the Cypress application to run
-
Run the test: Before running the test, please run the project in the background
- Click on the test.
- Google Chrome Browser will jump out and do the test automatically
- Names of test cases show on the left of the browser.
-
Read error messages: After running all tests cases, check the fail test by clicking it on the left, the screen shot of this test will show on the right.