- Add Node.js PPA
- sudo apt-get install curl python-software-properties
- curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
or
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
- Install Node.js on Ubuntu
- sudo apt-get install nodejs
- Test Node.js and NPM Version
- node -v
- npm -v
- Install Voting Server packages
- cd Vote/
- npm install
- Rename config_template.js to config.js
- Fill in Oauth information (e.g. google client id, secret)
- sudo node server.js
def run(*args):
total = sum(args)
return [ int(round(i / total, 2) * RANGE_YOU_WANT) for i in args] if total != 0 else [0] * len(args)