Armin Friedl
95683625da
All checks were successful
continuous-integration/drone/push Build is passing
|
||
---|---|---|
snip | ||
.drone.yml | ||
.gitignore | ||
Dockerfile | ||
LICENSE | ||
package-lock.json | ||
package.json | ||
Pipfile | ||
Pipfile.lock | ||
querysheet.http | ||
README.md | ||
snip.svg | ||
snip_screen.png | ||
TODO.org | ||
webpack.common.js | ||
webpack.dev.js | ||
webpack.prod.js |
Snip
No-fuzz link shortener.
Getting started
Snip is a self-hosted link shortener. It provides an API and a web interface. Dependencies are managed with pipenv and npm. Snip runs on flask the frontend is assembled with webpack. All this is rather simple in practice.
Run from docker
The simplest way to get started is to run snip from the regularily published docker containers.
docker run -p5000 arminfriedl/snip:latest
Then navigate your browser to http://localhost:5000. Alternatively, you can also query the REST API. For an example see the querysheet.http in this repository. If you want to run it manually you can also install snip and its dependencies yourself.
Install Dependencies
To install the dependencies for snip, you need pipenv and npm installed on your system. Then run:
pipenv install --dev
npm install --dev
Build Snip
The snip backend itself needs no separate build step. However, the frontend needs to be assembled by webpack.
# Run a development build with continuous update
npm run watch
# Run a production build
npm run publish
Run Snip
From the repository root run:
export FLASK_ENV=production # or development
export FLASK_APP=snip
pipenv run flask run
Flask will tell you where you can reach snip, per default http://localhost:5000.
Contribute
If you want to contribute to snip
feel free to send patches to
dev[at]friedl[dot]net. Alternatviely, you can issue a pull request on GitHub
which will be cherry picked into my tree. If you plan significant long-term
contributions drop me a mail for access to the incubator repository.
Github Users
If you are visiting this repository on GitHub, you are on a mirror of https://git.friedl.net/incubator/snip. This mirror is regularily updated with my other GitHub mirrors.
Like with my other incubator projects, once I consider snip
reasonable
stable the main tree will move to GitHub.