Skip to content

linktimecloud/kdp-ux

Repository files navigation

KDP UX

English | 简体中文

Development

Preparation

  • nvm
    • Ensure the node version specified in .nvmrc is installed, for example "nvm install --lts=Hydrogen"
    • Run nvm use to use the node version specified in .nvmrc, for example "nvm use --lts=Hydrogen"
    • Or set the node version as default by running nvm alias default <version>
  • yarn
    • Install yarn by running npm install -g yarn

Installation

  • Run cd ./frontend && yarn install to install dependencies in frontend directory
  • Run cd ./web && yarn install to install dependencies in web directory

Node Service Development

  • Open setupBackend.sh file in root directory and configure the env parameters such as mysql, backend service domain etc.
    • Check ./web/middlewares/proxy/proxyTable.js for proxy configuration
  • Run bash setupBackend.sh to start the node service
  • The source code of node service is in ./web directory

Front-end Development

  • In './frontend' directory, run npm run dev to start the frontend code
  • The frontend source code is in ./frontend directory

Build

  • In production, in './' directory, run docker build -t kdp-ux . to build docker image
  • For local integration testing environment, in './' directory, run bash build_dev.sh to build node and frontend applications

Knowledge Base

Basics

Node Service

Front-end