[Blog App] is a blogging app, designed to rival Twitter (lol). It is built with Ruby on Rails and uses the MVC architecture. It is a project for the Microverse Ruby on Rails curriculum.
- [Users can create posts, add likes and create comments to posts]
- [MVC architecture]
To get a local copy up and running, follow these steps.
In order to run this project you need:
- Install Ruby
- Install Ruby on Rails
- Install PostgreSQL
Clone this repository to your desired folder:
git clone git@github.com:wickathou/mcv-blog.git
Install the required gems
bundle install
Create the database by running the command
rails db:create
Then run the migrations by setting up the db
rails db:setup
Then seed the database using
rails db:seed
Run the tests using
rspec
Then run the rails server
rails s
To fetch all users:
curl -H 'Content-Type: application/json' -H 'Accept: application/json' -X GET http://localhost:3000/users
To fetch all comments to a post:
curl -H 'Content-Type: application/json' -H 'Accept: application/json' -X GET http://localhost:3000/posts/9/comments/
To post a comment to a post:
curl -H 'Content-Type: application/json' -H 'Accept: application/json' -X POST -d '{"comment": {"text":"something", "user_id":9}}' http://localhost:3000/users/9/posts/9/comments/
And now you should be able to see the project running on localhost:3000
👤 Javier Hernandez
- GitHub: @wickathou
- LinkedIn: LinkedIn
👤 Anshuman Singh Negi
- GitHub: @githubhandle
- Twitter: @twitterhandle
- LinkedIn: @LinkedIn
- [Add and delete posts]
- [Like posts]
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
Leave a ⭐️ if you like this project!
This project is GNU licensed.
