- ๐ About the Project
- ๐ป Getting Started
- ๐ฅ Authors
- ๐ค Contributing
- โญ๏ธ Show your support
- ๐ Acknowledgements
- ๐ License
hello-rails-back-end is a simple rails api that always returns a ramdom greetings message.
Client
Server
Database
To get a local copy up and running, follow these steps.
If you dont have Ruby installed on your computer, you can download it from here.
If you dont have Rails installed on your computer, you can download it from here.
If you dont have PostgreSQL installed on your computer, you can download it from here.
- Ruby: v3.1.2
- Rails: v7.0.1
- PostgreSQL: v14.5
- React: v17.0.2
If you have installed git you can clone the code to your machine, or download a ZIP of all the files directly.
Download the ZIP from this location, or run the following git command to clone the files to your machine:
-
Once the files are on your machine, open the blog-app folder in your code editor. Run the following command in your terminal to install the required gems and run the application:
-
Open the config/database.yml file in the project directory and change the username and password to your PostgreSQL username and password. Edit the default section of the file to look like this:
default: &default
adapter: postgresql
encoding: unicode
# For details on connection pooling, see Rails configuration guide
# http://guides.rubyonrails.org/configuring.html#database-pooling
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
username: <your PostgreSQL role username>
password: <your PostgreSQL role password>
NOTE:
You may need to run this command in the project directory to install the required gems and run the application:
bundle install
To run the project, execute the following command:
- Create the database with:
rails db:create
- Run the migrations with:
rails db:migrate
- Start the development server with:
rails server
- Open the app in your browser at http://localhost:3000
To run tests, run the following command:
bundle exec rspec
You can deploy this project using:
- Deplay to Heroku
git push heroku main
- Or deploy to Render
git push render main
- To get all greetings, send a GET request to the following URL:
https://hellogreetings.onrender.com/api/v1/greetings.json
๐ค Desmond Owusu Ansah
- Github @Owusu-Desmond
- Twitter @DesmondOwusuDev
- LinkedIn @desmond-owusu-ansah
- Dev.to desmondowusudev
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
If you like this project please give a โญ๏ธ to this project.
I would like to thanks everyone who support this project
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.