frontend
frontend copied to clipboard
Dart Scoring application
kcapp-frontend
kcapp (pronounced keɪk æp) is an application used for scoring Darts matches, with multiple input methods, statistics tracking, and more. See Wiki for more information
Install
Quick & Easy
To get started with development quickly, the following installer script can be used. More details can be found on the Wiki
Manual
- Clone repository
git clone https://github.com/kcapp/frontend.git
- Install all
nodejs
dependenciesnpm install
- Start the frontend by running the following command
- Windows
set DEBUG=kcapp:* & npm start
- Linux / OSX
# logging to stdout DEBUG=kcapp:* npm start # or logs redirected to file DEBUG=kcapp:* npm start &>> "log/kcapp.log"
- Windows
Update
- Pull latest changes
git pull
- Install all new
nodejs
dependenciesnpm install
- Delete
.cache
directoryrm -rf .cache
Configuration
Frontend depends on the kcapp-api for fetching data from the database.
The following environment variables can be used to adjust configuration
-
NODE_ENV
: specify if app should run inprod
ordev
mode.-
prod
will enable bundling and minifying -
dev
will start with browser-refresh for easier development
-
-
DEBUG
: value is passed to debug module to specify which packages should be logged -
KCAPP_API
: by defaultapi
runs onhttp://localhost:8001
, but this can be changed by setting it tohttp://<host>:<port>
-
PORT
: by default3000
-
DISK_CACHE
: settings this will cache to disk (.cache
) for optimized startup time between server runs. This folder must be deleted when a new version is deployed