Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/supanadit/short-url
Self hosted url shortener application, a bit.ly alternative
https://github.com/supanadit/short-url
hacktoberfest hacktoberfest2020 jquery laravel url-shortener urlshortener
Last synced: about 2 months ago
JSON representation
Self hosted url shortener application, a bit.ly alternative
- Host: GitHub
- URL: https://github.com/supanadit/short-url
- Owner: supanadit
- License: apache-2.0
- Created: 2020-07-01T08:52:19.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-09-08T16:37:08.000Z (over 2 years ago)
- Last Synced: 2023-03-10T10:35:50.467Z (almost 2 years ago)
- Topics: hacktoberfest, hacktoberfest2020, jquery, laravel, url-shortener, urlshortener
- Language: PHP
- Homepage: https://short.supanadit.com
- Size: 35.8 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Short URL
This is url shortener application is similar to [bit.ly](http://bit.ly)
## Demo
- Host : https://short.supanadit.com
- Email : [email protected]
- Password : 123### Generate Short URL
![Demo 1](demo/demo-1.gif)
### Generate Protected Short URL
![Demo 2](demo/demo-2.gif)
## Requirements
- Laravel 7.0+
- PHP 7.4## Quick Start
- `composer install`
- create `.env` file
- `php artisan key:generate`
- `php artisan migrate`
- `php artisan db:seed`
- `php artisan serve`#### Apache Configuration for Virtual Host
```apacheconfig
DocumentRoot /srv/http/short/public
ServerAdmin webmaster@localhost
ServerName short.test
DirectoryIndex index.php
AllowOverride All
Options FollowSymlinks
Require all granted
ErrorLog /var/log/httpd/short.test-error_log
CustomLog /var/log/httpd/short.test-access_log common```
## Docker Way
This app can run inside docker with official support
### Via Docker Compose
```bash
docker-compose up -d
```### Run Migration
```bash
docker-compose exec short-app php artisan migrate
```### Run Seeder
```bash
docker-compose exec short-app php artisan db:seed
```### Build Docker By Yourself
```bash
docker build . -t supanadit/short-url:1.0.2
```## Development Using Docker
### Run Application
```bash
docker-compose -f docker-compose.dev.yml up -d
```### Installing / Updating Dependencies
```bash
docker-compose -f docker-compose.dev.yml exec -w /srv short composer install # Composer Install
```### Generate Key
```bash
docker-compose -f docker-compose.dev.yml exec -w /srv short php artisan key:generate # Generate Key
```### Database Migration
```bash
docker-compose -f docker-compose.dev.yml exec -w /srv short php artisan migrate
```### Database Seed
```bash
docker-compose -f docker-compose.dev.yml exec -w /srv short php artisan db:seed
```### Shutdown Application
```bash
docker-compose -f docker-compose.dev.yml down
```### Updating `.env`
```bash
docker-compose -f docker-compose.dev.yml exec -w /srv short php artisan config:cache
```### Rebuilding Dockerfile
```bash
docker-compose -f docker-compose.dev.yml build
```### Troubleshooting MySQL Won't Run In Docker
Run this script `sudo chown -R 1001:1001 mysql`
Because we used Bitnami distribution version of MySQL, so we need to change the permission of mysql folder, since it
also described in docker page of bitnami## Note
If you want to use forgot password feature, you must provide your email and password at `.env`
## Support
[![ko-fi](https://www.ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/N4N01CIMZ)
## License
Copyright 2020 Supan Adit Pratama
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
License. You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "
AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
language governing permissions and limitations under the License.