GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — hip-hop-array/flightplan.js at master · HipHopArray/hip-hop-array Expand file tree/ Copy pathflightplan.jsMore file actions 46 lines (39 loc) · 1.54 KB / Copy pathflightplan.jsFile metadata and controls46 lines (39 loc) · 1.54 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 var plan = require('flightplan'); var appName = 'hip-hop-array'; var username = ''; var startFile = 'server/server.js'; // configuration var tmpDir = appName + '-' + new Date().getTime(); console.log(process.env.SSH_AUTH_SOCK) plan.target('production', [ { host: '', username: '', password: '', agent: process.env.SSH_AUTH_SOCK }, ]); // run commands on localhost plan.local(function(local) { // uncomment these if you need to run a build on your machine first // local.log('Run build'); // local.exec('gulp build'); local.log('Copy files to remote hosts'); var filesToCopy = local.exec('git ls-files', {silent: true}); // rsync files to all the destination's hosts local.transfer(filesToCopy, '/tmp/' + tmpDir); }); plan.remote(function(remote){ remote.log('Move folder to root'); remote.sudo('cp -R /tmp/' + tmpDir + ' ~', {user: username}); remote.rm('-rf /tmp/' + tmpDir); remote.log('Install dependecies'); remote.sudo('npm --production --prefix ~/' + tmpDir + ' install ~/' + tmpDir, {user: username}); remote.sudo('~/' + tmpDir + '/node_modules/bower/bin/bower install ~/' + tmpDir + '/bower.json', {user: username}); remote.sudo('cp -R ~/bower_components/ ~/' + tmpDir + '/client', {user: username}); remote.log('Reload application'); remote.sudo('export PORT=80', {user: username}); remote.sudo('ln -snf ~/' + tmpDir + ' ~/' + appName, {user: username}); remote.exec('forever stop ~/' + appName + '/' + startFile, {failsafe: true}); remote.exec('forever start ~/' + appName + '/' + startFile); }); |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |