diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..4c8ba05 --- /dev/null +++ b/.npmignore @@ -0,0 +1,20 @@ +* +!*.js + +config/*.js +!config/*-sample.* + +!tools/* +tools/*.coffee + +!test/* +test/*.coffee + +!bin/genieacs-acs +!bin/genieacs-api +!bin/genieacs-files + +!httpscert.key +!httpscert.crt + +*~ diff --git a/README.md b/README.md index 7a481eb..ecbe5c5 100644 --- a/README.md +++ b/README.md @@ -13,9 +13,11 @@ GenieACS is a *blazing fast* TR-069 auto configuration server (ACS) built with N ## Getting started -Install [Node.js](http://nodejs.org/), [Redis](http://redis.io/), and [MongoDB](http://www.mongodb.org/). Refer to the corresponding documentation for installation guides. Use NPM to install GenieACS and its dependencies by typing: +Install [Node.js](http://nodejs.org/), [Redis](http://redis.io/), and [MongoDB](http://www.mongodb.org/). Refer to the corresponding documentation for installation guides. Then use NPM to install GenieACS by typing: - npm install genieacs + npm install -g genieacs + +You may need to modify the configuration files under "config" directory (in /lib/node_modules/genieacs/config) depending on your setup. Alternatively, you can use git to get the latest development version (not recommended for production use): @@ -23,23 +25,29 @@ Alternatively, you can use git to get the latest development version (not recomm git clone https://github.com/zaidka/genieacs.git cd genieacs npm install - -System configuration files can be found under "config" directory. Copy the sample config files provided by removing the "-sample" suffix and modify as necessary. + npm run configure + npm run compile Finally, run the following in GNU Screen session or something similar: - node acs + genieacs-acs This is the service that the CPEs will communicate with. It listens to port 7547 by default (see config/config.json). Configure the ACS URL of your devices accordingly. - node api + genieacs-api This is the API module. It exposes the API on port 7557 by default. This is needed for the GUI front end to communicate with. - node files + genieacs-files This is the file server from which the CPEs will download firmware images and other types of files. +You can use stream redirection to output to log files: + + genieacs-acs >> /var/log/genieacs-acs.log 2>> /var/log/genieacs-acs-err.log + genieacs-api >> /var/log/genieacs-api.log 2>> /var/log/genieacs-api-err.log + genieacs-files >> /var/log/genieacs-files.log 2>> /var/log/genieacs-files-err.log + For further details about installation and configuration, refer to the [wiki section](https://github.com/zaidka/genieacs/wiki). You may now proceed with installing [GenieACS GUI front end](https://github.com/zaidka/genieacs-gui). diff --git a/package.json b/package.json index 8244f28..cadf4ce 100644 --- a/package.json +++ b/package.json @@ -2,22 +2,6 @@ "name": "genieacs", "version": "0.9.1", "description": "A blazing fast TR-069 auto configuration server (ACS) built with Node.js, Redis, and MongoDB", - "directories": { - "test": "test" - }, - "dependencies": { - "libxmljs": "~0.8.1", - "redis": "~0.10.0", - "hiredis": "~0.1.15", - "mongodb": "~1.3.23" - }, - "devDependencies": { - "coffee-script": "~1.7.1" - }, - "scripts": { - "prepublish": "coffee -c *.coffee", - "test": "node test" - }, "repository": { "type": "git", "url": "https://github.com/zaidka/genieacs.git" @@ -28,6 +12,29 @@ "ACS" ], "author": "Zaid Abdulla", - "license": "MIT", - "readmeFilename": "README.md" + "license": "AGPL3", + "readmeFilename": "README.md", + "directories": { + "test": "test", + "bin": "bin" + }, + "dependencies": { + "libxmljs": "~0.8.1", + "redis": "~0.10.0", + "hiredis": "~0.1.15", + "mongodb": "~1.3.23" + }, + "devDependencies": { + "coffee-script": "~1.7.1" + }, + "engines": { + "node": ">=0.10.0 <0.12" + }, + "scripts": { + "prepublish": "npm run compile", + "compile": "./node_modules/.bin/coffee -c *.coffee test/*.coffee tools/*.coffee", + "configure": "cp config/config-sample.json config/config.json; cp config/parameters-sample.json config/parameters.json; cp config/custom_commands-sample.json config/custom_commands.json; cp config/auth-sample.js config/auth.js", + "install": "npm run configure", + "test": "node test" + } }