https://github.com/tanhongit/rails_shortener_url_project
URL Shortener is a free tool to shorten a URL or reduce a link and making it easy to remember.
https://github.com/tanhongit/rails_shortener_url_project
rails rails-shortener ruby shorten-urls shortener shortener-rails shortener-url tanhongit-rails
Last synced: about 2 months ago
JSON representation
URL Shortener is a free tool to shorten a URL or reduce a link and making it easy to remember.
- Host: GitHub
- URL: https://github.com/tanhongit/rails_shortener_url_project
- Owner: tanhongit
- License: mit
- Created: 2020-08-22T16:12:32.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-08T21:58:22.000Z (about 2 years ago)
- Last Synced: 2025-02-13T03:49:41.104Z (4 months ago)
- Topics: rails, rails-shortener, ruby, shorten-urls, shortener, shortener-rails, shortener-url, tanhongit-rails
- Language: Ruby
- Homepage: https://shortener-rails.herokuapp.com/
- Size: 344 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# Welcome to Rails Shortener URL Project by TANHONGIT
We build a **_Link Shortener Web Application_** in Ruby on Rails 6.
URL Shortener is a free tool to shorten a URL or reduce a link and making it easy to remember.
# 1. Technology
- Ruby on Rails# 2. Configuration requirements
We are going to build the web application using:
- Rails 6.0.3.3
- Ruby 2.7.1# 4. Runing
### 4.1. Clone Repo
```
$ git clone https://github.com/TanHongIT/Rails_Shortener_URL_Project
$ cd Rails_Shortener_URL_Project
```### 4.2. Bundle Install
```
$ bundle install
```### 4.3. Yarn Install
```
$ yarn install
```### 4.4. Create database with Postgresql
You must change the appropriate database configuration
Change configuration at _"**config/database.yml**"_ with Postgresql.
```ruby
default: &default
adapter: postgresql
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
timeout: 5000
username: rails_shortener_url_project
password: 1974
host: localhost# tutorial for ubuntu linux:
# sudo -u postgres psql
# create user "rails_shortener_url_project" with password '1974';
# create database "rails_shortener_url_project" owner "rails_shortener_url_project";development:
<<: *default
database: rails_shortener_url_project# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
<<: *default
database: rails_shortener_url_project_testproduction:
<<: *default
database: rails_shortener_url_project_production
```You must change the username, password and database name accordingly!
### 4.5. run rails db:migrate
```
$ rails db:migrate
$ rails db:migrate RAILS_ENV=development
$ rails db:migrate RAILS_ENV=test
```### 4.6. Run server
```
$ rails s
```Now, go to http://localhost:3000/
# Demo Image:

## Support for me
Support this project :stuck_out_tongue_winking_eye: :pray: