Shortgun Web Client provides Web Client for Shortgun URL Shortener.
- Latest LTS or current version of Node.js installed (for build purposes)
- Nginx or another web server up and running
- Shortgun server up and running
- Git installed
-
Clone this ropository to local machine
git clone https://github.com/konrad-molitor/shortgun-web-front.git
-
Navigate to
shortgun-web-front
directorycd shortgun-web-front
-
Perform dependencies install
npm install
-
Build project
npm run build
-
Navigate to build directory
cd build
-
Copy files from this directory to web-server's directory.
-
Configure web-server to serve index.html for
/
path, upstream/a/*
and/s/*
requests to Shortgun API and serve Shortgun image thumbnails directory for/images/
.
Essentially, Shortgun Web Client serves following routes:
/
- Starting route, will provide login/signup functionality (or shortcut creation form, if token exists in local storage)/profile
- List of created shortcuts/about
- Simple about page/contacts
- Contacts page with direct message functionality
Take quick look over functionality.
If logged in, Shortgun Web Client will store current token in browser's local storage. Shortgun Web Client also checks browser's local storage for token on page load, so it will be no need to login again.
Since JWT tokens issued by Shortgun are non-expiring, the only way to cancel login is to use "Logout" button
If provided and available Shortgun Web Client will show page previews. Hovewer previews can be only seen on screens that have >768px width. In most cases when using on mobile devices you can turn your device to landscape mode to view previews.
PRs are welcome. For major changes, please open an issue first to discuss what you would like to change.
Icons courtesy of Alexander Kahlkopf, https://iconmonstr.com/
Unless stated elsewhere, file headers or otherwise, the license as stated in LICENSE file.