- ๐ About the Project
- ๐ Live Demo
- ๐ป Getting Started
- ๐ฅ Authors
- ๐ญ Future Features
- ๐ค Contributing
- โญ๏ธ Show your support
- ๐ Acknowledgements
- ๐ License
[Blog] is going to be a fully functioning blog website. It will have all the classic functions and users will be able to interact with the website by adding posts, liking them, and commenting under them.
Client
Server
Database
- [Data is processed in models]
- [Users can register]
- [Users can add posts]
- [Users can like posts and add comments]
- [In progress...]
To get a local copy up and running, follow these steps.
In order to run this project you need: ruby version 2.7.0+ rails version 7+ PostgreSQL
Clone this repository to your desired folder:
https://github.com/MattGomb/Blog.git
cd Blog
Install this project with:
bundle install
This app uses postgreSQL databases for data preservation. Please provide valid credentials in a .env
file and place it in the root folder.
To initialize database run:
rails db:create
rails db:migrate
To run the server, execute the following command:
rails s` or `rails server
this will start the server on http://localhost:3000/
To use the features of the app, you'll have to sign up using:
http://127.0.0.1:3000/users/sign_up
Once you sign up, you can log in from:
http://127.0.0.1:3000/users/sign_in
For API log in:
http://127.0.0.1:3000/api/v1/login
you ned to suply your email and pasword using JSON format in the body of the request as follows:
{
"email": "your_mail@mail.com",
"password": "yourpassword"
}
In the response of the request you will recieve a token that you will need to copy and will have 24 hours of validity. Please provide your token in the Authorization
header of subsequent requests.
To list posts for a specific user in JSON format:
http://127.0.0.1:3000/api/v1/users/:user_id/posts
To list comments for a post in JSON format:
http://127.0.0.1:3000/api/v1/users/:user_id/posts/:post_id/comments
Use this last endpoint with POST method to create comments for a post. Provide the text of the comment in JSON format as follows:
{
"text": "your comment"
}
To run tests, run the following command:
rspec
You can deploy this project using:
TBA
๐ค Mรกtyรกs Gombos
- GitHub: @MattGomb
- Twitter: @MtysGombos1
- LinkedIn: LinkedIn
๐ค Felipe Oyarzo
- [improved user interface]
- [reference posts]
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
If you like this project please consider giving it a star!
We would like to thank Microverse for the opportunity.
This project is MIT licensed.