Skip to content

1. Setup

Chabardes edited this page Jun 3, 2022 · 14 revisions

First step: setup the dojo !

1. Clone the repo

git clone git@github.com:pchab/nest-ddh-dojo.git

2. Install

  1. Install the packages npm install
  2. Create a db createuser -s postgres createdb dojo
  3. Create a .env file with the db configuration POSTGRES_DB=dojo POSTGRES_USER=postgres
  4. Run the Typeorm migrations npm run typeorm:migration:run

3. Run

npm run start:dev

That's it, the server is running. Take a look at the package.json file to see the available scripts: lint, tests ...

Additional tips

Debugger

image

With the command palette ⌘⇧P, you can switch the auto-attach feature to the smart mode. Then, if you start the server in a VSCode terminal, you will be able to add breakpoints to your code. This is most useful if you need to understand what's going on when the code is running. image

Insomnia

Get the DDH Dojo collection and pull its latest snapshot. image

You can test your GraphQL requests with Insomnia. image

Mermaid

You can preview the mermaid graphs directly in VSCode with the Markdown Preview Mermaid Support extension.

Clone this wiki locally