← Back to DAGDA | Support | Source: https://github.com/quantum93/world_travel_backend
Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

README

World Travel Application

Project for Week 12 at the coding school, Epicodus, written on August 22, 2019.

By Tae Lee and Alex Siegberg

Description

A website for (fictional) world travel information created using Ruby on Rails. In particular, this website informed about the countries in the world from traveler. Each traveler gives rating by their experience and written comments. You can visit the random country site within this website. In order to use this website, you need two git repos (world_travel_backend and world_travel_interface). The backend logic was tested with the integration test spec for API call.

Database

The site should have functionality to review countries but your database should have built-in list of countries (check deployment instructions). All reviews should have an author, comments and rating. (A rating can be a number between 1 and 10.) You can include other fields of your choosing as well.

Scopes

This site should use scopes to display the following information on the site: The country with the most reviews. The country with highest averaged ratings from travelers. A suggestion of country to visit by random selection

Seeding

This project should include seed data for 195 countries with 5 to 25 250 reviews. Use Faker with a loop to seed the database.

  • Deployment instructions For API service back-end, execute rails server with port number 3001 in same machine with interface. rails s -p 3001 For interface, execute rails server with port number 3000 in same machine with interface. rails s

Setup/Installation Requirements

  • Open terminal and type 'git clone https://github.com/quantum93/world_travel_interface.git'
  • Open terminal and type 'git clone https://github.com/quantum93/world_travel_backend.git'
  • Navigate to each project directory using cd in terminal
  • Open project in text editor (atom .)
  • _Type 'bundle install' in terminal to load Gems
  • rake db:create
  • rake db:migrate
  • For API service back-end, execute rails server with port number 3001 in same machine with interface.
  • rails s -p 3001
  • For interface, execute rails server with port number 3000 in same machine with interface.
  • rails s
  • copy countries(name) from '/Users/Guest/Desktop/world_travel_api/countries.csv' DELIMITER ',';
  • rake db:seed
  • rails server -p 3001 (For API server back-end,)
  • rails server 3000 (For userinterface side,)
  • open http://localhost:3000 in a web browser
  • To run tests, type 'rspec' in terminal
  • postgres DB installation with sql script in project (if your Postgres DB is not starting at login, please execute "pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start" on terminal.
  • for database backup, please execute followings in terminal,
  • pg_dump [YOUR DATABASE NAME] > database_backup.sql
  • for database restore after clone, please execute followings in terminal
  • createdb [DATABASE NAME]
  • psql [DATABASE_NAME] < database_backup.sql
  • createdb -T [DATABASE NAME] [TEST DATABASE NAME]

Support and contact details

Please contact us if you have any issues at: taebumlee@gmail.com

Technologies Used

License

This software is licensed under MIT license.

Copyright (c) 2019 _Tae Lee and Alex Siegberg

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages