Backend service created with Ruby On Rails. If you want to see the backend in action you can clone/download the frontend app
- Ruby
- Ribu On Rails
- VSCode
- Ruby Mine
- GIT
- GitHub
- RSpec
- PostgreSQL
Computers endpoint
Endpoint | Method | Description | Body params |
---|---|---|---|
/api/v1/computers | GET | Get all computers | - |
/api/v1/computers | POST | Create new computer | hdd, processor, ram, brand, price, accessories, image |
/api/v1/computers/:id | DELETE | Delete computer from database | - |
/api/v1/computers/:id | GET | Get computer by ID | - |
Favorites endpoint
Endpoint | Method | Description | Body params |
---|---|---|---|
/api/v1/favorites | POST | Create new favorite | user_id, computer_id |
/api/v1/favorites/:id | DELETE | Delete favoritefrom database | - |
Users endpoint
Endpoint | Method | Description | Body params |
---|---|---|---|
/api/v1/users | POST | Create new user | username, email, password_diggest |
/api/v1/users/login | POST | Login with username & email | username, email |
To get a local copy up and running follow these simple example steps. In order to use this app you need to download the frontend application from here
-
Make sure that Ruby is installed in your computer (try to run ruby -v from your prompt), if not you can install it from here., also you need PostgreSQL
-
Download and unzip or clone this repository
- Open your terminal and move to the root of the project, using
$ cd
command. - Run
$ bundle install
to install all dependencies. - You must run
$ rails db:create
to create the database and$ rails db:migrate
to migrate the tables and$ rails db:seed
- After this now you can run the server with
$ rails s
- You can go to http://127.0.0.1:3000/ to check that service is running.
You can run test using rspec
- Create the database with
bundle exec rake db:create RAILS_ENV=test
- And do the proper migrations with
bundle exec rake db:migrate RAILS_ENV=test
- Finally run the test with
bundle exec rspec
- Front End
- Back End
- GitHub: @SunnySparks
- Twitter: @JosfranT6
- LinkedIn: LinkedIn
- Github: @Rocio01
- Twitter: @rugiada8801
- Linkedin: Zulma Rocio Martinez
This project is MIT licensed.