Skip to content

alejandrocen/open-countries

Repository files navigation

OpenCountries

open-countries

OpenCountries provide countries information via a REST API.

Links

Requirements

  • Ruby 2.7+.
  • MongoDB 4.4+.

Installation

bundle install

Development

Start the web server:

rackup -p 9292

Rake tasks

Show tasks:

bundle exec rake -T

Import countries information:

bundle exec rake countries:import

Show routes:

bundle exec rake routes

Run the linter:

bundle exec rake rubocop

Run all tests:

bundle exec rake test

Command line

Start command line:

ruby bin/console

Returns the total count of all countries:

Country.count