GithubHelp home page GithubHelp logo

surge's Introduction

surge(.sh)

Publish web apps to a CDN with a single command and no setup required.

NPM

This is the CLI client for the surge.sh hosted service. It’s what gets installed when you run npm install -g surge.

This CLI library manages access tokens locally and handles the upload and subsequent reporting when you publish a project using surge.

Usage

It’s easier to show than tell so let’s get to it! The following command will deploy the current working directory to the surge servers where the application will be available at sintaxi.com.

$ surge ./ sintaxi.com

Run surge --help to see the following overview of the surge command...


  Surge – Single-command web publishing. (v0.20.3)

  Usage:
    surge <project> <domain>

  Options:
    -a, --add           adds user to list of collaborators (email address)
    -r, --remove        removes user from list of collaborators (email address)
    -V, --version       show the version number
    -h, --help          show this help message

  Additional commands:
    surge whoami        show who you are logged in as
    surge logout        expire local token
    surge login         only performs authentication step
    surge list          list all domains you have access to
    surge teardown      tear down a published project
    surge plan          set account plan

  Guides:
    Getting started     surge.sh/help/getting-started-with-surge
    Custom domains      surge.sh/help/adding-a-custom-domain
    Additional help     surge.sh/help

  When in doubt, run surge from within your project directory.

CDN Features

  • Custom CNAME & custom SSL
  • Fallback 404.html pages
  • HTML5 mode 200.html pages
  • Stays out of gits way
  • Supports clean URLs && trailing slashes /
  • Implicit signup
  • Supports CNAME files

If you’re using tools like Grunt, Gulp, or a static site generator like Jekyll, your files are output into a compile directory like _site/, build/, or www/. From the root of your project, pass Surge the path to this directory to upload your compiled assets.

surge www

You may also add this directory to your .gitignore to keep your compiled assets out of your Git history.

surge's People

Contributors

adam-martin avatar alex0112 avatar andyj avatar djanowski avatar drhayes avatar kennethormandy avatar koddsson avatar lewiscowper avatar natew avatar pdehaan avatar rfreitas avatar silentrob avatar sintaxi avatar trevorsayre avatar

Watchers

 avatar

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.