/fullstackopen

Fullstackopen course by University of Helsinki

Primary LanguageJavaScript

Fullstackopen2022 course by University of Helsinki

Part 8: GraphQL

  • replace Apollo Server with Apollo Server Express, install following libraries
npm install apollo-server-express apollo-server-core express @graphql-tools/schema

Part 9: TypeScript

Setup

  • install both ts-node package and the official typescript package globally by running:
npm install -g ts-node typescript
  • or create an npm project and install the dependencies by running
npm install --save-dev ts-node typescript

9c Setting up the project

run npm init and install typescript package as a dev dep

npm install typescript --save-dev

TypeScript's Native Compiler(tsc), npm script for running tsc is as follows:

{
    //...
    "script": {
        "tsc": "tsc"
    },
    //...
}

initialize tsconfig.json settings by running:

npm run tsc -- --init

doublecheck that everything really works by running the compiler and the eslint from the command line with commands:

npm run tsc
npm run lint

Part13

part 13a

  • Create database table automatically for model Note
Note.sync()

display

\d

display table users

\d users

toggle expands display view

\x