def install(): apt.add_repository('ppa:chris-lea/node.js') apt.update() apt.install([ 'gcc', 'make', 'g++', 'git', 'python', 'python-software-properties', 'nodejs' ]) git.clone(REPO) npm.install(REPO) npm.install_globals('forever') start()
def deploy(rm_node_modules=False): git.update(REPO) if rm_node_modules: npm.rm_node_modules(REPO) npm.install(REPO) restart()