This post contains content about Now 1.0 – Learn about the latest version, Now 2.0.
Now 2.0 - Upgrade Available
Until today, the common workflow for deploying a project located on GitHub was cloning it to your device, adjusting it and then running
now to shoot it up into the cloud.
With this update, it's getting much easier.
▲ now rauchg/slackin
Generally speaking, the above is the only thing you need to run in order to deploy a GitHub repository directly to now.
In this case, however, you also need to tell slackin the name of the Slack team it should send invitations for and the API key. Thankfully, you can use all of the existing options of
now in combination with this new feature!
Therefore, you can easily specify these details as environment variables:
▲ now -e SLACK_API_TOKEN="23uhc87" -e SLACK_SUBDOMAIN="socketio" rauchg/slackin
Once now fetches the repository, you'll see just what you're used to: A link to the deployment, the repository will be deployed and the logs will be printed out. Once the repo has finished uploading, you'll see the invitation page:
Since there might be cases in which you'd like to choose a certain branch or commit containing a special change you'd like to share with other people (or see how it works in production mode), we've made it very easy to select a git reference of your choice.
Simply append a
# followed by the name of the branch or the commit. Assuming that you'd like to deploy the branch "v2", this is how the command will look like:
▲ now rauchg/slackin#v2
And it works just as easy for commits. Just append the SHA:
▲ now rauchg/slackin#e0f09a5
By default, now will select the
master branch. However, as you can see, it only requires a single statement if you want to change this behavior!
▲ now https://github.com/rauchg/slackin
This also means that you can easily point to commits:
▲ now https://github.com/rauchg/slackin/commit/20ae6d3
...or even branches:
▲ now https://github.com/rauchg/slackin/tree/master
If you've installed Now's command line interface using Now Desktop, the only thing you need to do is make sure that the application is running. Assuming that's the case, the binary will automatically be updated for you in the next few minutes!
However, if that's not the case, we highly recommend you to download it and use it to install the CLI. Afterwards, you're covered!
If you're on a platform that's not yet supported by Now Desktop, simply update/install the command line utility like this:
npm install -g now@latest
Have fun with this new feature!