diff options
author | HampusM <hampus@hampusmat.com> | 2021-08-18 17:29:55 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2021-08-18 17:29:55 +0200 |
commit | d1a1b7dc947063aef5f8375a6a1e03246b272c84 (patch) | |
tree | f5cb9bd6d4b5463d9d022026ac6fea87cb6ebe02 /docs_src | |
parent | 6ed078de30a7bf35deace728857d1d293d59eb15 (diff) |
Implemented caching for certain API endpoints, Added documentation & made backend-fixes
Diffstat (limited to 'docs_src')
-rw-r--r-- | docs_src/configuring.md | 62 | ||||
-rw-r--r-- | docs_src/installation.md | 2 |
2 files changed, 64 insertions, 0 deletions
diff --git a/docs_src/configuring.md b/docs_src/configuring.md new file mode 100644 index 0000000..8465384 --- /dev/null +++ b/docs_src/configuring.md @@ -0,0 +1,62 @@ +## Settings +You can configure Githermit with a `settings.json` file in the root of the project directory. + +This file has both required and optional keys. + +### Required +| Name | Type | Description | +|---------|--------|-----------------------------------------------| +| host | string | Desired host address | +| port | number | Desired port | +| title | string | The title of the Githermit instance | +| about | string | A short description of the Githermit instance | +| git_dir | string | A directory with bare git repositories | + +### Optional + +**cache:**<br> + +| Name | Type | Description | Default | +|------------------|---------|------------------------------------------------|---------| +| enabled | boolean | Whether or not caching is enabled | true | +| ttl | number | How long cached data should last (in seconds) | 120 | +| max | number | The maximum size of the cache (0 = infinity) | 5000000 | +| refreshThreshold | number | The time left on a cache key's ttl to refresh | 80 | + +**dev:**<br> + +| Name | Type | Description | +|------|--------|------------------------------------------------| +| port | number | Desired port for the Vue.js development server | + +<br> + +## Examples +**Your normal everyday settings file:** +``` +{ + "host": "localhost", + "port": 80, + "title": "Dave's cool git projects", + "about": "Take a look on all of my awesome stuff!", + "git_dir": "/var/git" +} +``` + +**An ideal settings file for development:** +``` +{ + "host": "localhost", + "port": 8080, + "title": "Bob's cool programs", + "about": "Cool, huh?", + "git_dir": "/home/bob/git-projects", + "dev": { + "port": 8008 + }, + "cache": { + "enabled": false + } +} +``` + diff --git a/docs_src/installation.md b/docs_src/installation.md index f19c4e0..9753c85 100644 --- a/docs_src/installation.md +++ b/docs_src/installation.md @@ -39,6 +39,8 @@ The final step is to create a file called `settings.json` with the following con } ``` +You can find more in-depth information about configuring Githermit in [configuring](/docs_src/configuring.md). + ## Starting You can now run Githermit with `$ yarn start`
\ No newline at end of file |