This is a project to learn how to use React with Rails by Implementing a connection between a Ruby on Rails back-end and React front-end. This project contains the fronted part of it.
- Ruby
- Rails
- Postgresql
- Linters
- This app has API end points
- It fetches from the API and renders the data
- It renders random greetings on refreshing and navigating to the './ message
Live Demo Link
-To get a local copy up and running follow these simple example steps.
- A Command Line Interface.
- Having Ruby installed.
- Setup Rails
- Postgresql
- A code editor like Visual Studio Clone.
- Git installed.
To check if you have Git, Postgres and Ruby installed you can use the commands below:
$ git --version
$ ruby --version && irb
If you don't have Ruby, you can find a complete list of ways to install Ruby, including using third-party tools like rvm, see:
(https://www.ruby-lang.org/en/downloads/)
If you installed git you can clone the code to your machine, or download a ZIP of all the files directly.
-
Open the [Repository Link]https://github.com/41hulk/hello-rails-backend.git of this project in GitHub.
-
Once the files are on your machine, open capstone-ruby folder in Visual Studio Code.
Clone this repository to your desired folder: $ git clone
https://github.com/41hulk/hello-react-front-end.git
https://github.com/41hulk/hello-rails-backend.git
https://github.com/41hulk/hello-react-front-end/pull/1
` Navigate to the created folder. - Initialize your project with Git. - Make sure that your project has Postgres database set up. - Run rails server and visi thttp://127.0.0.1:3005/ in your browser! git clone https://github.com/41hulk/hello-react-front-end
- cd hello-react-front-end
- npm install
- npm start
### run the following in your terminal:
- gem install rails
- gem install pg
- bundle install (use this whenever you want add a gem in your gem file)
- rails db:create
- change your database password to suit yours in database.yml `
To check linters locally, use
`$ rubocop`
`$ npx stylelint "**/*.{css,scss}"`
Once you have the project correctly set up, run
`$ bin/rails db:setup`
--Once you have your repository cloned on your machine, feel free to modify it as needed.
- To add your own page
👤 Ntare Guy
- GitHub: @41hulk
- Twitter: @ntare_guy
- LinkedIn: @Ntare Guy
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like this project!
Web Design All the template colors, font, and layout distribution for the whole project were designed by Gregoire Vella on Behance. A link to the project can be found here. Check Gregoire for more amazing GUI and Graphic designs!
-Hat tip to all documentations used -Inspiration
This project is MIT licensed.
NOTE: we recommend using the MIT license - you can set it up quickly by using templates available on GitHub. You can also use any other license if you wish.