Giter Club home page Giter Club logo

elk-cli's Introduction

Elk Logo

What is elk?

elk is a command line tool that allows you to deploy your own URL shortening service (like bit.ly). All you have to do is elk add /twitter https://twitter.com/holtbt and within seconds that URL on your domain will start forwarding.

How does it work?

elk is built on top of Zeit's now and zeit.world services. If you've never used these services, they're amazing and fantastic. now allows you to deploy node servers by simply typing now into the CLI of the directory you want to deploy. Within seconds your node server is out in the wild and publically available (they give you a URL to access it.) zeit.world is DNS configuration service. By typing now alias <your deployed now URL> <your own URL> your own domain will now be point at that deployed service (after you've pointed your domain's nameservers at Zeit's.) Be forewarned though that this feature that elk exploits is part of their paid tier (something they well deserve.) elk will still work without the paid tier; you just don't get custom domain support.

How do I get elk working?

  1. If you haven't, set up now
  2. If you want custom domain support, set up zeit.world on your domain.
  3. npm install --global elk-cli
  4. elk defaultAlias example.com (or whatever your custom domain is; you can skip this if you're not doing a custom domain)
  5. elk add /github https://github.com/btholt/elk
  6. Go to the URL (in this case https://example.com/github) and see it be redirected!

Commands

elk add <path> <url> <options>

Add a new redirect to your server. Deploys to now by default and aliases if a defaultAlias has been set. <path> is whatever the node requests receive as the path. Therefore / is the base URL as well as /example, /example?, and /example?other=1 are all different.

elk remove <path>

Remove a redirect from your server. Deploys to now by default and aliases if a defaultAlias has been set.

elk list

Lists defaultAlias and currently configured redirects

elk defaultAlias <alias>

Displays current defaultAlias if no alias is provided. If alias is provided, it sets it as the new defaultAlias. The alias can be anything that the now alias command understands. See their docs.

Options

-w or --wait

For add and remove, this will add or remove a redirect without deploying. Useful if you add a bunch of redirects but don't want to deploy until the end

-a <alias> or --alias <alias>

This will override whatever the defaultAlias is and set this to the alias after it deploys. The alias can be anything that the now alias command understands. See their docs.

-d or --debug

See the output from now and now alias

-n or --no-alias

Don't run the aliasing step

Contribute

Yes please!

License

MIT

elk-cli's People

Contributors

btholt avatar ryanbraganza avatar travenasty avatar ryanburgess avatar

Stargazers

 avatar  avatar Mohammed Alrefai avatar Mike Roberts avatar Adrian avatar Vinod Godti  avatar Anton Rusinov avatar Peter Piekarczyk avatar João Marins avatar Brent Vatne avatar  avatar Samarth Jajoo avatar xunm avatar Genar Trias Ortiz avatar Jamie Rolfs avatar NAKAMURA Masayuki avatar Micah Rich avatar Rajkumar Magar avatar Kevin Ridgway avatar Benjamin Fleischer avatar Andrii Trybynenko avatar Ali Torki avatar David avatar TalaatMagdy avatar Mathias Karstädt avatar Xavier Cazalot avatar Naoufal Kadhom avatar Atsushi Yamamoto avatar Chad avatar Klaus avatar Shoaib Bhimani avatar Chris Novello avatar Lucas avatar Denys Vitali avatar Nemanja Stojanovic avatar Tony Wang avatar Kennet Postigo avatar Zach Stoltz avatar Gustavo García avatar Xavier Carpentier avatar Ryen Beatty avatar Gabriel Dumitrescu avatar Kyle Simpson avatar Kent C. Dodds avatar Chris Alcantara avatar Mark Palfreeman avatar Txema León avatar Juan Picado avatar Eric Bailey avatar Erick Bazán avatar Max Stoiber avatar Jared Palmer avatar Cem Turan avatar Wilson Miner avatar Asier avatar  avatar Augustus Yuan avatar Ricky Rauch avatar Vicente de Alencar avatar  avatar Bernardo Baquero Stand avatar  avatar

Watchers

James Cloos avatar Mark Palfreeman avatar  avatar

elk-cli's Issues

Digital Ocean / Heroku

No reason this can't work with Digital Ocean or Heroku given their dev APIs. Would skip the alias step.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.