deployit-cli v1.1.3
Deployit
NodeJS CLI library for deploy your project from local to your linux server
Installation
On server and local machine:
npm i -g deployit-cliUsage
Setup server
server command
Run command:
deployit --setup --username user --password pass --port 12345Setup local machine
local command
Inside project root run command and edit created "deployit.config.js":
deployit --initor manually create "deployit.config.js":
module.exports = {
"name": "app_name",
"client": {
"path": "",
"ignore": [
"deployit.config.js",
".git",
".idea",
"node_modules",
"src"
]
},
"deploy": {
"username": "user",
"password": "pass",
"host": "localhost",
"port": 12345,
"path": "~/app_folder",
"post_command": "npm i -g pm2 && npm i && pm2 start index.js --name app_name"
}
}Provide info for connect with server:
name : Project name
client.path : Project root
client.ignore : Array\<String> with files or directories what must be ignored
deploy.username : Server Deployit username
deploy.password : Server Deployit password
deploy.host : Server ip or domain
deploy.port : Server Deployit port
deploy.path : Path where must locate your project on server
deploy.post_command : Command will be executed after project deploy
Start
server command
Start Deployit:
deployit --startStop
server command
Stop Deployit:
deployit --stopReset
server command
Reset Deployit:
deployit --resetDeploy
local command
Deploy your project to server:
deployit