Skip to content

Commit b72485a

Browse files
authored
chore: update documentation to include install commands for typescript (#7691)
1 parent 4e5e871 commit b72485a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/server/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,12 @@ First, install Apollo Server, the JavaScript implementation of the core GraphQL
9292
npm install @apollo/server graphql express cors body-parser
9393
```
9494

95+
If using Typescript you may also need to install additional type declaration packages as development dependencies to avoid common errors when importing the above packages (i.e. Could not find a declaration file for module '`cors`'):
96+
97+
```
98+
npm install --save-dev @types/cors @types/express @types/body-parser
99+
```
100+
95101
Then, write the following to `server.mjs`. (By using the `.mjs` extension, Node lets you use the `await` keyword at the top level.)
96102

97103
```js

0 commit comments

Comments
 (0)