Make sure you have the following installed on your system:
- Node.js 20 or later
- npm (comes with Node.js) or yarn
- Docker
- Open your terminal.
- Run the following command to clone the repository:
git clone https://github.com/quang-pham-dev/rich-challenge.git
- Navigate to the project directory:
cd rich-challenge
In the project root directory, you can run:
Runs the app in development mode. By default, it is accessible at http://localhost:8080
Runs tests.
Builds the app for production in the dist
folder.
Your app is ready to be deployed!
To access the GraphQL Playground:
- Ensure the application is running (use
yarn start:dev
for development mode). - Open your web browser and navigate to
http://localhost:8080/graphql
. - You should now see the GraphQL Playground interface where you can explore the API, write queries, and test mutations.
Note: Make sure the GRAPHQL_PLAYGROUND
environment variable is set to true
to enable the playground in your environment.
Environment | Description | Value |
---|---|---|
PORT | The port that the server is listening to | 8080 |
DATABASE_URL | Database connection URL | postgresql://user:password@localhost:5432/your_database |
JWT_ACCESS_SECRET | JWT access token secret | your_access_secret |
JWT_ACCESS_EXPIRATION | JWT access token expiration | 15m |
JWT_REFRESH_SECRET | JWT refresh token secret | your_refresh_secret |
JWT_REFRESH_EXPIRATION | JWT refresh token expiration | 7d |
GRAPHQL_PLAYGROUND | Enable GraphQL playground | true |
GRAPHQL_INTROSPECTION | Enable GraphQL introspection | true |