This is a simple Rails API, that will be used by React to It generate and desplay a rendom greeting message.
To get a rendom greeting message, you need to send a GET request to the following endpoint:
- [GET /messages](https://localhost:3000/messages)
To create a new message, you need to send a POST request to the following endpoint with a JSON body:
{
"title": "Message ten"
"text": "Hello World",
}
- [POST /messages](https://localhost:3000/messages)
To delete a message, you need to send a DELETE request to the following endpoint with a JSON body:
{
"id": 1
}
- [DELETE /messages](https://localhost:3000/messages)
For using the app you can use the Demo link above to see the app in action, no further prerequisites are needed.
You should have ruby on rails
and postgresql
installed and running on your machine in adition to the react-rails
gem before you can start developing this app.
To start using this software you need to have Ruby installed in your machine Then clone this repo:
-$ git clone git@github.com:Ismailco/Hello-world-Rreact_rails.git
-$ cd Hello-world-Rreact_rails
Then install the gems:
-$ bundle install
-$ rake db:create db:migrate
Then run the server:
-$ rails server
👤 Ismail Courr
- GitHub: @ismailco
- Twitter: @ismailcourr
- LinkedIn: Ismail courr
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like this project!
This project is MIT licensed.