Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mattgomb/blog
https://github.com/mattgomb/blog
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/mattgomb/blog
- Owner: MattGomb
- License: mit
- Created: 2023-01-31T23:54:19.000Z (almost 2 years ago)
- Default Branch: development
- Last Pushed: 2023-02-18T02:58:27.000Z (almost 2 years ago)
- Last Synced: 2024-11-06T06:43:10.730Z (about 2 months ago)
- Language: Ruby
- Size: 225 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ๐ Table of Contents
- [๐ About the Project](#about-project)
- [๐ Built With](#built-with)
- [Tech Stack](#tech-stack)
- [Key Features](#key-features)
- [๐ Live Demo](#live-demo)
- [๐ป Getting Started](#getting-started)
- [Setup](#setup)
- [Prerequisites](#prerequisites)
- [Install](#install)
- [Usage](#usage)
- [Run tests](#run-tests)
- [Deployment](#deployment)
- [๐ฅ Authors](#authors)
- [๐ญ Future Features](#future-features)
- [๐ค Contributing](#contributing)
- [โญ๏ธ Show your support](#support)
- [๐ Acknowledgements](#acknowledgements)
- [๐ License](#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.
### Prerequisites
In order to run this project you need:
ruby version 2.7.0+
rails version 7+
PostgreSQL
### Setup
Clone this repository to your desired folder:
```
https://github.com/MattGomb/Blog.git
```
```
cd Blog
```
### Install
Install this project with:
```
bundle install
```
### Usage
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": "[email protected]",
"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"
}
```
### Run tests
To run tests, run the following command:
```
rspec
```
### Deployment
You can deploy this project using:
**TBA**
๐ค **Mรกtyรกs Gombos**
- GitHub: [@MattGomb](https://github.com/MattGomb)
- Twitter: [@MtysGombos1](https://twitter.com/MtysGombos1)
- LinkedIn: [LinkedIn](https://www.linkedin.com/in/gombos-matyas/)
๐ค **Felipe Oyarzo**
- GitHub: [@jfoyarzo](https://github.com/jfoyarzo)
- LinkedIn: [LinkedIn](https://www.linkedin.com/in/jorge-felipe-oyarzo-contreras)
- [improved user interface]
- [reference posts]
Contributions, issues, and feature requests are welcome!
Feel free to check the [issues page](../../issues/).
If you like this project please consider giving it a star!
We would like to thank [Microverse](https://www.microverse.org/) for the opportunity.
This project is [MIT](./LICENSE) licensed.