- Ruby and Node.js installed
- Bundler and npm (or yarn) installed globally
-
Clone the repository:
git clone https://github.com/andrijzyn/RailsAsAPI-CORS.git
-
Navigate to the project directory:
cd RailsAsAPI-CORS
-
Install Ruby dependencies:
bundle install
-
Install JavaScript dependencies:
yarn install
- Run migrations:
bin/rails db:migrate
-
Start the Rails server:
bin/rails server -b 0.0.0.0 -p 3000 -e development
-
Start the frontend development server:
npm run dev
- Precompile assets:
RAILS_ENV=production bin/rails assets:precompile