auto-deploy

0.0.8 • Public • Published

auto-deploy

auto deploy github based project and others

designing version downloads linux coverage climate dependencies

language: English also available in: Spanish -

Use

Add launch line to package.json

{
  "scripts": {
    "auto-deploy": "auto-deploy-run server/server.js"
  }
}
 

Use the module in your server

var autoDeploy = require('auto-deploy');
 
app.use(apUrl, autoDeploy.middleware({pid:12345}));
 

To log into a text file you can pass the filename as an argument to auto-deploy-run, for example:

{
  "scripts": {
    "auto-deploy": "auto-deploy-run -l server.log server/server.js"
  }
}
 

Then start the server with

npm run-script auto-deploy

Then run commands in the URL of the browser, for example:

http://theserver.zzz/tools/auto-deploy?restart

http://theserver.zzz/tools/auto-deploy?stop&pid=3344

possible improvements

  • the servers checks the local repository to ensure it's cleaness (to prevent conflicts with the git pull)
  • the possibility to register a function that checks the integrity and status of the server.
    • in the case where it's safe to shutdown the server, it returns an explanatory message and a random code to force. ie: force=4312
    • the force option executes the indicated action anyway.

License

MIT

................

Readme

Keywords

none

Package Sidebar

Install

npm i auto-deploy

Weekly Downloads

2

Version

0.0.8

License

MIT

Last publish

Collaborators

  • tute