Project Create with React and RailsAPI
Live Demo
.
Report Bug
·
Request Feature
Template for Websites.
- npm version 6.13.4 or more
- node version 8.17.0 or more
- ruby version 2.6.5 or more
- rails version 6.0.2.1 or more
- clone the repository website-atc
- cd in to the folder and run
bundle install
- run
rails db:create && rails db:migrate && rails db:seed
* (If there are problems with the service of postgresql check DB Section) - cd in to /client folder and run
npm install
- return to root folder and run
rails start
- wait until both servers will be initialized
- go to localhost:3000
- Run:
sudo apt-get update && sudo apt-get install postgresql
- Run:
sudo service postgresql start
- Run:
sudo -i -u postgres
- Run:
psql
- Run:
CREATE USER <user> with encrypted password '<password>';
(with semicolon) - Run:
ALTER USER <user> createdb;
- Back-end: (Ruby on Rails), create this file:
config/local_env.yml
* e.g:DATABASE_USERNAME: <user>
* e.g:DATABASE_PASSWORD: <password>
- Front-end (React), create this file:
client/.env
* e.g:REACT_APP_KEY_API=randomkey123