- replace Apollo Server with Apollo Server Express, install following libraries
npm install apollo-server-express apollo-server-core express @graphql-tools/schema- 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 typescriptrun npm init and install typescript package as a dev dep
npm install typescript --save-devTypeScript's Native Compiler(tsc), npm script for running tsc is as follows:
{
//...
"script": {
"tsc": "tsc"
},
//...
}initialize tsconfig.json settings by running:
npm run tsc -- --initdoublecheck that everything really works by running the compiler and the eslint from the command line with commands:
npm run tsc
npm run lint- Create database table automatically for model Note
Note.sync()display
\ddisplay table users
\d userstoggle expands display view
\x