This repository has been archived by the owner on Aug 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Setup
Andrey Bogdanov edited this page Jan 25, 2016
·
11 revisions
- 2 GHz CPU is recommended. Though there is no actual limit, file/page processing may be annoyingly slow if your CPU is slow.
- 1-1.5 GB of free RAM. Technically, 200-300 MB should be enough, but due to a strange Node.js or Express bug memory consumption sometimes increases up to 700-800 MB for some 0.5-1 seconds and then decreases back to normal value.
- Any system where Node.js is supported (Windows, Linux, Mac OS, etc.) will be OK (in theory). Tested on Ubuntu 10.04 x32.
- Node.js 5.0.0+. 4.2.x may be OK, but this is not tested.
- file (should support video/webm MIME-type). File for Windows
Listed in package.json. Just npm install
them. Type the following in your terminal/console:
npm install --save deep-equal dot express express-device formidable fs-ext jsdom merge mkpath moment promisify-node q-io readline-sync request uuid
- When a form is parsed with
formidable
, multiple files with the same field name are parsed, but only one of them is finally available. So the saved file may not be deleted and pollutes temporary directory.
To fix this, apply the patch: cd patch && ./apply.sh
. You are using Windows? Deal with it.
Create config.json
. You may also create another configuration files (config.json
is git-ignored) and specify them as command line parameters:
./app.js ./config-dev.json
See config.json.example
for configuration example.
{
"serverPport": 8080, /*The port to listen to.*/
"site": {
"protocol": "http", /*Default site protocol.
If your site enorces SSL/TLS, change it to https.*/
"domain": "localhost:8080", /*Your site domain name.
You must change this for remote access.*/
"pathPrefix": "", /*Should be specified if there are several sites
running on the same host.*/
"dateFormat": "MM/DD/YYYY HH:mm:ss", /*Most of the dates on the site
will be formatted using this.*/
"timeOffset": 0 /*Server GMT time offset.*/
},
"maxProxyFail": 1, /*Maximum proxy fail count after which the proxy
will not be used anymore
(though it will be left in the list).*/
"captcha": {
"google-recaptcha-v1": {
"key": "Your 2captcha.com key" /*2captcha.com user access key*/
}
}
}
Create a ramdisk:
mkdir /mnt/tmpfs
chmod 777 /mnt/tmpfs
mount -t tmpfs -o size=xxxM tmpfs /mnt/tmpfs
Here xxx
is the ramdisk size in megabytes.
Now specify the path in config.json
:
...
"tmpPath": "/mnt/tmpfs"
100-200 MB of memory should be enough.