- Server -
/packages/server
- node lts/gallium
- yarn
- git bash (windows users only)
- Install yarn:
npm install -g yarn
- If you use nvm, select right version of NodeJS with:
nvm use
-
Create
.env
file in the project root directory. Copy content of.env.sample
into.env
. -
(Windows users only) run
yarn win-setup
in order to setup bash shell for yarn
Run all scripts from the project root.
To install dependencies run:
yarn
To generate GraphQL types from schema:
yarn server:codegen
Note: Types will be generated to /packages/server/src/graphqlTypes.ts from schema located in packages/server/src/graphQL/schema.graphql.
To start NodeJS server with hot-reload on PORT specified in .env
file:
yarn server:dev
To build and start NodeJS server.
yarn server:build
Specify envrionment variables in your .env
file. Available variables are:
- DOCUMENT_IDENTITY_SERVICE - url to DOT Document server
- SERVER_PORT - apollo-server-express port. Default value is 8000
- AUTH_TOKEN - Authorization token for DIS API calls. In order to obtain AUTH_TOKEN, please contact our sales department