Danie12345 / blogonrails

A blog app made with Rails.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Blog App

A classic blog app made with Rails. This is a fully functional website that shows a list of the authors. For each author is shows a list of their posts and empowers readers to interact with them by adding comments and liking posts.

Built With

  • Ruby on Rails
  • PostgreSQL
  • devise / devise-jwt - for authentication
  • cancancan - for authorization

Getting Started

To get a local copy up and running follow these simple steps:

Prerequisites

  • Ruby ruby-3.1.2 installed
  • PostgreSQL dbms running

Setup Project

  • Open your terminal and navigate to the folder you would like to save the project.

  • Type these commands into the terminal:

git clone git@github.com:Danie12345/blogonrails.git
cd blogonrails
bundle install
  • You will need a .env file before you install and run the project. The .env file contains environment variables needed to deploy the webpage. There is a commented .env.example file you can use as a guide to configure your own. Type the following command into the terminal (or Git Bash, if using Windows) to create your .env file:
cp .env.example .env
rails secret
  • Edit file .env

    • Replace the value for the variable DEVISE_JWT_SECRET_KEY with the value returned by the rails secret command.
    • Provide values for DATABASE_HOST, DATABASE_USER and DATABASE_PASSWORD
  • Type this command into the terminal to reset the database:

rails db:reset

Run application

  • Type this commands into the terminal:
rails server

Run tests

  • Type these commands into the terminal:
rspec spec -f doc lib

Author

👤 Daniel Malo

Collaborator

👤 Roberto A. Baños Alvarez


🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a ⭐️ if you like this project!

Acknowledgments

About

A blog app made with Rails.


Languages

Language:Ruby 74.3%Language:HTML 18.0%Language:CSS 4.8%Language:Batchfile 2.8%Language:JavaScript 0.1%