react-ssh-deployer
v1.0.1
Published
This service making easy to deploy your ReactJs project to server
Downloads
2
Maintainers
Readme
npm install react-ssh-deployer
Copy deployer.js and deploy.sh to your ReactJs root directory
cp ./node_modules/react-ssh-deployer/deployer.js ./
cp ./node_modules/react-ssh-deployer/deploy.sh ./
Make deploy.sh executable
chmod +x ./deploy.sh
** Change server configurations in deploy.sh file **
Setup you ssh server port,username,address and path where you need to deploy your build folder.
Make sure your server path is have all permissions to write files in it.
spawn scp -P 22 -r ./build username@ipaddress:/var/www/html/
expect "assword:"
Enter your server password
send "123456\r"
interact
Run command directly from ReactJS root folder from your terminal.
node deployer.js && ./deploy.sh