Skip to content

Instantly share code, notes, and snippets.

@nitinja nitinja/
Created Feb 19, 2017

What would you like to do?
script to bundle & deploy Javascript apps to remote server using npm
#Get app version
APP_VERSION=$(node -pe "require('./package.json').version")
#create a name for your bundle
#create an archive
tar -czvf $ARCHIVE_NAME -C ./dist .
#deploy to server
curl -u username:password -X PUT "$APP_VERSION/$ARCHIVE_NAME" -T ./$ARCHIVE_NAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.