diff --git a/Procfile.dev b/Procfile.dev index b26b8715..c85f0e81 100644 --- a/Procfile.dev +++ b/Procfile.dev @@ -1,2 +1,2 @@ -web: PORT=3000 bundle exec rails s -p 3000 +web: PORT=3001 bundle exec rails s -p 3001 webpacker: bundle exec ./bin/shakapacker-dev-server diff --git a/README_LOCAL_SETUP.md b/README_LOCAL_SETUP.md index c8947060..016c2644 100644 --- a/README_LOCAL_SETUP.md +++ b/README_LOCAL_SETUP.md @@ -96,6 +96,14 @@ yarn install ### 6. Start the Development Servers +**Option 1: Using Foreman (recommended)** +```bash +foreman start -f Procfile.dev +``` +This starts both Rails server (port 3001) and Webpack dev server (port 3036) together. + +**Option 2: Separate terminals** + In separate terminal windows: ```bash @@ -106,6 +114,8 @@ PORT=3001 bundle exec rails s -p 3001 bundle exec ./bin/shakapacker-dev-server ``` +**Important**: Both servers are required - Rails serves the backend while Webpack compiles JavaScript/CSS assets including Vue.js components. + ### 7. Access the Application Open your browser and navigate to: diff --git a/config/shakapacker.yml b/config/shakapacker.yml index 7a70c711..bc7bec89 100644 --- a/config/shakapacker.yml +++ b/config/shakapacker.yml @@ -21,7 +21,7 @@ development: dev_server: server: 'http' host: localhost - port: 3035 + port: 3036 hmr: false inline_css: true live_reload: false