This app is a reference implementation of react-devise.
React Devise Sample is deployed on Heroku: https://github.com/timscott/react-devise-sample
Steps to set up after cloning the repo locally.
gem install bundler
bundle
rails db:setup
# Create .env file with devise token secret
rails secret | (read secret; echo DEVISE_JWT_SECRET_KEY="$secret" > .env)
# Install client dependencies
(cd client && yarn)
# Run the app
foreman start -f Procfile.dev
The api and the website will run on different ports. The port specified in the .foreman
file will be used for the api, and the website will run on that port +100. To get the website to access the api on it's own domain, we have added the following to ./client/package.json
.
"proxy": "http://localhost:[the same port in the .foreman file]"
If you want to change the ports locally, change both .foreman
and ./client/package.json
to the same port.
- This app uses some bits that are not necessary for
react-devise
to function:
- By default we are not using the plugin react-devise-material-ui. To try it out, uncomment the commented lines in the setup file.