forked from shakacode/react-webpack-rails-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProcfile.dev
22 lines (17 loc) · 1 KB
/
Procfile.dev
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Basic procfile for dev work.
# Runs all processes. Development is faster if you pick one of the other Procfiles if you don't need
# some of the processes: Procfile.rails or Procfile.express
# Development rails requires both rails and rails-assets
# (and rails-server-assets if server rendering)
rails: REACT_ON_RAILS_ENV=HOT rails s
# Run the hot reload server for client development
rails-assets: sh -c 'rm app/assets/webpack/* || true && HOT_RAILS_PORT=3500 npm run build:dev:client'
# Keep the JS fresh for server rendering. Remove if not server rendering
rails-server-assets: sh -c 'npm run build:dev:server'
# If you don't keep this process going, you will rebuild the assets per spec run. This is configured
# in rails_helper.rb.
rails-test: sh -c 'npm run build:test:client'
# Run an express server if you want to mock out your endpoints. No Rails involved!
# Disable this if you are not using it.
# It's a great way to prototype UI especially with non-Rails developers!
express: sh -c 'HOT_PORT=4000 npm start'