Skip to content

bolmsten/d-b

Repository files navigation

Available Scripts

In the project directory, you can run:

npm run dev

Runs the app in the development mode.
Open http://localhost:4000 to view the GraphQL playground in the browser.

You will need to manually reload if you make edits.

npm run test

Launches the Jest test runner and prints the coverage report when done with tests.

npm run tsc

Compiles typescript to javascript for production to the build folder.

Your app is ready to be deployed!

npm run lint

Lints typescript code and log if there are any errors.
npm run lint:fix should be used if you want to fix all autofixable errors and warnings.

Development helper scripts

In the project directory, you can also run:

node .\dev-commands\crudHelper.js c <name>

This command will create all files and CRUD operations needed for starting new endpoint.
For example: node .\dev-commands\crudHelper.js c instrument will initialize all GraphQL mutations and queries for creating, reading, updating and deleting an instrument.
💡 Keep in mind that you need to go through all the generated files and add the missing parts for specific case.

Happy coding! 👨‍💻