Giter VIP home page Giter VIP logo

tanhongit / rails_shortener_url_project Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 352 KB

URL Shortener is a free tool to shorten a URL or reduce a link and making it easy to remember.

Home Page: https://shortener-rails.herokuapp.com/

License: MIT License

Ruby 68.75% JavaScript 5.00% CSS 0.68% HTML 22.31% SCSS 3.26%
tanhongit-rails shorten-urls shortener shortener-rails shortener-url rails-shortener rails ruby

rails_shortener_url_project's Introduction

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.

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_test

production:
  <<: *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:

Image

Support for me

Support this project ๐Ÿ˜œ ๐Ÿ™

PayPal buymeacoffee TanHongIT

rails_shortener_url_project's People

Contributors

tanhongit avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.