Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/littlstar/l3
Dead simple local cdn
https://github.com/littlstar/l3
Last synced: about 1 month ago
JSON representation
Dead simple local cdn
- Host: GitHub
- URL: https://github.com/littlstar/l3
- Owner: littlstar
- License: mit
- Created: 2015-08-26T02:23:11.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-18T20:49:47.000Z (about 9 years ago)
- Last Synced: 2023-08-24T03:51:53.774Z (over 1 year ago)
- Language: JavaScript
- Size: 12.7 KB
- Stars: 8
- Watchers: 18
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
l3
=====
Dead simple local cdn.## about
`l3` is an easy to use local cdn for when your on the move and just
can't stand bad internet. l3 wants to help ease your development pain by
keeping files you'd access on the web local on your filesystem.
l3 maintains a directory structure for you and allows you to sync files
with no effort. l3 will help you maintain the lifetime of these files by
providing easy mechanisms for expiration and purging.## installation
`l3` can be installed with `npm`.
```sh
$ npm install -g l3
```## usage
Out of the box `l3` ships with the following comands:
* `init` - Outputs useful information for sourcing in your `.bashrc` or `.bash_profile`.
* `setup` - Sets up the l3 environment on your filesystem.
* `sync` - Syncs a file into a bucket namespace
* `index` - Opens up the l3 index file with your editor (`$EDITOR`).
* `update` - Updates files in a bucket configurable with bucket and file patterns.
* `server` - Starts a l3 web server.
* `purge` - Purge entire store or by bucket.
* `which` - Returns an absolute file path to a named file## example
Sync file:
```sh
$ l3 sync -b images/giphy https://media.giphy.com/media/xISLHoUElBz5m/giphy.gif
```List file:
```sh
$ l3 ls
images/giphy/giphy.gif
```Open the file
```sh
$ open $(l3 which images/giphy/giphy.gif)
```Serve files:
```sh
$ l3 server -p 3000
serving `/Users/jwerle/.l3'
listening on port 3000
```Open the file in the browser:
```sh
$ open http://localhost:3000/images/giphy/giphy.gif
```## license
MIT