Skip to content

devguilhermeribeiiro/random_facts_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Curious Facts

Curious Facts is a simple yet fun application that showcases my ability to integrate third-party APIs. Each time you refresh the page, it connects to an external API to fetch 10 random facts and displays them on the screen. While it is a basic project, it demonstrates my skills in API integration, even though I am still in the learning phase.

How to Run the Application Locally

To run this application on your local environment, follow the steps below:

1. Clone the Repository

Open your terminal and run the following command:

git clone https://github.com/devguilhermeribeiro/curious_facts.git; cd curious_facts

2. Configure the API

Visit the API Ninjas website and obtain your API key. Then, create a .env file at the root of the project and add your API key:

# .env
API_NINJAS_KEY=your-api-key

3. Install Dependencies

Run Bundler to install all necessary dependencies:

bundle install

Note: Make sure you have a Ruby development environment set up.

4. Run the Application

Finally, start the application with the command:

ruby app.rb

And there you go, you are "ON SINATRA"! 😄 Jokes aside, this application was developed using Ruby version 3.3.4. If you encounter any issues running it, ensure that your Ruby version is compatible or adapt the code to the version you are using.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published