Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sintaxi/surge
CLI for the surge.sh CDN
https://github.com/sintaxi/surge
Last synced: about 2 months ago
JSON representation
CLI for the surge.sh CDN
- Host: GitHub
- URL: https://github.com/sintaxi/surge
- Owner: sintaxi
- Created: 2014-07-26T09:30:05.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2023-08-30T20:26:24.000Z (about 1 year ago)
- Last Synced: 2024-04-27T07:31:34.704Z (5 months ago)
- Language: JavaScript
- Homepage: https://surge.sh
- Size: 681 KB
- Stars: 2,812
- Watchers: 36
- Forks: 132
- Open Issues: 199
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - sintaxi/surge - CLI for the surge.sh CDN (JavaScript)
- awesome-starred - sintaxi/surge - CLI for the surge.sh CDN (others)
README
# surge(.sh)
> Publish web apps to a CDN with a single command and no setup required.
[![NPM](https://nodei.co/npm/surge.png?global=true)](https://nodei.co/npm/surge/)
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:
surgeOptions:
-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 messageAdditional 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 planGuides:
Getting started surge.sh/help/getting-started-with-surge
Custom domains surge.sh/help/adding-a-custom-domain
Additional help surge.sh/helpWhen 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 `git`s way
- Supports clean URLs && trailing slashes `/`
- Implicit signup
- Supports CNAME filesIf 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.