diff --git a/docs/install.md b/docs/install.md index cf736c9..2ca64f2 100644 --- a/docs/install.md +++ b/docs/install.md @@ -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 diff --git a/package-lock.json b/package-lock.json index a4c1474..c45096d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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", diff --git a/package.json b/package.json index df365ad..c2799c9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "haste", - "version": "0.2.3", + "version": "0.2.4", "description": "Private Pastebin Server - continued by zneix", "keywords": [ "paste", diff --git a/server.js b/server.js index 709e077..00932e0 100644 --- a/server.js +++ b/server.js @@ -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({