mirror of
https://github.com/SunRed/haste-server.git
synced 2024-12-27 06:30:11 +01:00
Updated config documentation, changed env vars
Removed HASTE_ prefix as it would not work on evironments like Heroku, relevant comment: https://github.com/zneix/haste-server/pull/7#issuecomment-695790378
This commit is contained in:
parent
58c37bf677
commit
45b4ce87a8
4 changed files with 14 additions and 11 deletions
|
@ -53,18 +53,21 @@ npm install
|
|||
|
||||
## Edit configuration
|
||||
|
||||
There is an [example configuration file](../example.config.json) available for you to copy:
|
||||
Haste can already work "out-of-the-box" with no config changes - useful for environments like Heroku or Dokku.
|
||||
You can use `HOST` and `PORT` environment variables for host and port specification to override config values.
|
||||
|
||||
However, there is an [example configuration file](../example.config.js) available for you to copy:
|
||||
|
||||
```bash
|
||||
cp example.config.json config.json
|
||||
cp example.config.js config.js
|
||||
```
|
||||
|
||||
By default storage system stores haste documents as hashed files in `./data` directory.
|
||||
|
||||
Rest of provided defaults are enough to run the server, however, example config contains comments about what each value does and you can adjust the options to your likings.
|
||||
|
||||
[Guide for all supported storage systems.](./storage.md).
|
||||
[Guide for all supported key generators.](./generators.md).
|
||||
[Guide for all supported storage systems](./storage.md).
|
||||
[Guide for all supported key generators](./generators.md).
|
||||
|
||||
|
||||
## Run the server
|
||||
|
|
8
package-lock.json
generated
8
package-lock.json
generated
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "haste",
|
||||
"version": "0.2.3",
|
||||
"version": "0.2.4",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -713,9 +713,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"bl": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/bl/-/bl-4.0.2.tgz",
|
||||
"integrity": "sha512-j4OH8f6Qg2bGuWfRiltT2HYGx0e1QcBTrK9KAHNMwMZdQnDZFk0ZSYIpADjYCB3U12nicC5tVJwSIhwOWjb4RQ==",
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/bl/-/bl-4.0.3.tgz",
|
||||
"integrity": "sha512-fs4G6/Hu4/EE+F75J8DuN/0IpQqNjAdC7aEQv7Qt8MHGUH7Ckv2MwTEEeN9QehD0pfIDkMI1bkHYkKy7xHyKIg==",
|
||||
"requires": {
|
||||
"buffer": "^5.5.0",
|
||||
"inherits": "^2.0.4",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "haste",
|
||||
"version": "0.2.3",
|
||||
"version": "0.2.4",
|
||||
"description": "Private Pastebin Server - continued by zneix",
|
||||
"keywords": [
|
||||
"paste",
|
||||
|
|
|
@ -22,8 +22,8 @@ const utils = new HasteUtils();
|
|||
//load config and set some defaults
|
||||
const config = require('./config');
|
||||
|
||||
config.host = process.env.HASTE_HOST || config.host || '127.0.0.1';
|
||||
config.port = process.env.HASTE_PORT || config.port || 7777;
|
||||
config.host = process.env.HOST || config.host || '127.0.0.1';
|
||||
config.port = process.env.PORT || config.port || 7777;
|
||||
|
||||
//set up logger
|
||||
winston.add(new winston.transports.Console({
|
||||
|
|
Loading…
Reference in a new issue