Practice App with Typescript. This project includes both the service application and client app for retrieving customer information.
- Customer Service technologies
- Client app technologies
- Docker - Docker Compose is used to bring up our database.
The client and server applications are found respectively in the ./packages directory. From the project root you can run yarn
commands to run the specific project scripts (see below).
git clone
the repository- Create a
.env
file in./packages/server
with the following values
CUSTOMER_DB_ENDPOINT=postgres://postgres:password@localhost:5432/customerdb
POSTGRES_PASSWORD=password
The following commands can be used to bring up different components of the project:
yarn install
in the project root directoryyarn db-up
to bring up the database (wraps docker-compose up).yarn db-migrate
to initialize the database schemayarn db-seed
to seed the database with mock data.- (optional)
yarn client build
to create a production build of the client app. Recommend just using development server launched withclient-start
yarn server-start
to bring up the serveryarn client-start
to bring up the client web app
These yarn commands wrap other CLI commands for convenience. The actual commands can be found in the respective client and server packages package.json scripts and are aliased in the root project package.json.
yarn client-test
to run tests for the client appyarn server-test
to run run tests for the server app. Note: Make sure the database is up and seeded.
The client app development server will run on localhost:3000
.
The server is available on localhost:6001
.
- A build of the client app will be served on
localhost:6001/
- A GraphiQL app to interact with the graphql API is served on
localhost:6001/graphql
.- The graphql schema and docs are available through the GraphiQL app.