Skip to content

Commit

Permalink
chore: update documentation to include install commands for typescript (
Browse files Browse the repository at this point in the history
  • Loading branch information
torressam333 authored Aug 18, 2023
1 parent 4e5e871 commit b72485a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ First, install Apollo Server, the JavaScript implementation of the core GraphQL
npm install @apollo/server graphql express cors body-parser
```

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`'):

```
npm install --save-dev @types/cors @types/express @types/body-parser
```

Then, write the following to `server.mjs`. (By using the `.mjs` extension, Node lets you use the `await` keyword at the top level.)

```js
Expand Down

0 comments on commit b72485a

Please sign in to comment.