A boilerplate repo with Apollo server, MongoDB and Typescript
Dependencies:
- Express - to use node express server
- Nodemon - dev dependency
- typescript - dev - core TS library which will help in Compiling the TS code to valid JS
- ts-node - dev - util library that can help us run the TS programs directly from the terminal
- @types/node - dev - type declarations for node
- @types/express - dev - type declaration for express code
- eslint - dev
- @typescript-eslint/parser - dev
- @typescript-eslint/eslint-plugin - dev
- apollo-server-express - TS project so no types
- graphql + @types/graphql
- lodash.merge
- @types/lodash.merge - dev
- mongodb
- @types/mongodb - dev
Files:
-
tsconfig.json - This is where the TS config is customized and acts like a guide for the TS compiler with options required to compile the project.
-
.eslintrc.json - Responsible for setting up the eslint configuration in the project.
Settings: Add these settings to the settings.json on vscode
"eslint.validate": [
"javascript",
"javascriptreact",
{
"language": "typescript",
"autoFix": true
},
{
"language": "typescriptreact",
"autoFix": true
}
],