Skip to content

SealmDegefu/project-template-react-rails-api

 
 

Repository files navigation

WHOLENESS

Description

Wholeness is a complete wellness app that allows users to find different type of specialist from personal trainers to mental health therapist to help them be the best version of themselves. This is built using Ruby, Rails, React, and Postgresql

Requirements

  • Ruby 2.7.3
  • NodeJS (v14 or higher), and npm
  • Heroku CLI
  • Postgresql

See Environment Setup below for instructions on installing these tools if you don't already have them.

Setup

Fork and clone this repository.

Then run:

bundle install
rails db:create
npm install --prefix client

You can use the following commands to run the application:

Make sure to also update this README to include documentation about your project. Here's a list of some awesome readmes for inspiration.

Deploying

This application has all the starter code needed to help you deploy your application to Heroku. It's recommended to deploy your project early and push up changes often to ensure that your code works equally well in production and development environments.

To deploy, first log in to your Heroku account using the Heroku CLI:

heroku login

Create the new Heroku app:

heroku create my-app-name

Add the builds for Heroku to run the Rails app on Ruby and build the React app on Node:

heroku buildpacks:add heroku/nodejs --index 1
heroku buildpacks:add heroku/ruby --index 2

To deploy, commit your code and push the changes to Heroku:

git add .
git commit -m 'Commit message'
git push heroku main

Note: depending on your Git configuration, your default branch might be named master or main. You can verify which by running git branch --show-current. If it's master, you'll need to run git push heroku master instead.

Any time you have changes to deploy, just make sure your changes are committed on the main branch of your repo, and push those changes to Heroku to deploy them.

You can view your deployed app with:

heroku open

Environment Setup

Ruby

Ensure you are running the latest Ruby release supported by Heroku. At the time of writing, that's 2.7.3. You can verify with:

ruby -v

If you don't see 2.7.3, you can install it and set it as the default version:

rvm install 2.7.3
rvm --default use 2.7.3

You should also install the latest versions of bundler and rails:

gem install bundler
gem install rails

Install NodeJS

Verify you are running a recent version of Node with:

node -v

If your Node version is less than 14, update it with:

nvm install node

You can also update your npm version with:

npm i -g npm

Install the Heroku CLI

Follow this guide to install Heroku CLI (if you don't already have it):

Install Postgresql

Heroku requires that you use Postgresql for your database instead of SQLite. Postgresql (or just Postgres for short) is an advanced database management system with more features than SQLite. If you don't already have it installed, you'll need to set it up.

To install Postgres for WSL, follow this guide:

To install Postgres for OSX, you can use Homebrew:

brew install postgresql

Capstone

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 57.7%
  • JavaScript 33.2%
  • CSS 5.9%
  • HTML 3.2%