Coder Social home page Coder Social logo

backend-project's Introduction

BACKEND PROJECT

Backend project using Ruby On Rails + PostgreSQL

SETUP

Build

To build the project, run the command:

docker-compose build

this will build the necessary containers for the Application and Database

Serve the App

To bring the Rails App up, run the command:

docker-compose up

You should be able to access the app through the URL http://localhost:4000.

Create Database

To create and set up the database, just run the following command:

docker-compose run web rake db:create db:setup

this will create both development database and test database

Run specs

To run the application specs, run the commaand:

docker-compose run web rake

ALGORITHM EXPLANATION

To short urls the project uses a conversion from base10 to base62, using the ID generated by database to create the url_code. It's is a simple algorithm and could be seen inside app/services/url_shortener.rb, and tested in spec/services/url_shortener_spec.rb.

Deploy

The app is hosted on AWS Beanstalk, working inside a Ruby2.7.1 enviroment

App link: http://shortenedurlapi-env.eba-hmyteghu.sa-east-1.elasticbeanstalk.com/

backend-project's People

Contributors

kaynanguarany avatar

Watchers

 avatar  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.