From ea8e49201d6930e8b6c1b7f27b7b15dff3eb2f44 Mon Sep 17 00:00:00 2001 From: Tom Morris Date: Wed, 12 Apr 2017 14:02:07 +0100 Subject: [PATCH] adding Procfile and Foreman now we have multiple dev server processes to run --- Gemfile | 1 + Gemfile.lock | 5 ++++- Procfile | 2 ++ README.md | 6 ++++++ 4 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 Procfile diff --git a/Gemfile b/Gemfile index 9bdefb8aea..8c1bbca232 100644 --- a/Gemfile +++ b/Gemfile @@ -79,6 +79,7 @@ group :development, :test do gem 'byebug', platform: :mri gem 'rawler', git: 'git://github.com/oscardelben/rawler.git', require: false gem 'rspec-rails', '~> 3.5' + gem 'foreman' end group :development do diff --git a/Gemfile.lock b/Gemfile.lock index 12616e7ec8..c13991d78e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -118,6 +118,8 @@ GEM faraday (0.11.0) multipart-post (>= 1.2, < 3) ffi (1.9.17) + foreman (0.84.0) + thor (~> 0.19.1) formatador (0.2.5) foundation-rails (6.3.0.0) railties (>= 3.1.0) @@ -306,6 +308,7 @@ DEPENDENCIES colorize dotenv-rails elasticsearch + foreman foundation-rails (= 6.3.0.0) guard-livereload (~> 2.5) jbuilder (~> 2.5) @@ -334,4 +337,4 @@ RUBY VERSION ruby 2.4.0p0 BUNDLED WITH - 1.13.7 + 1.14.6 diff --git a/Procfile b/Procfile new file mode 100644 index 0000000000..2fec4ef4be --- /dev/null +++ b/Procfile @@ -0,0 +1,2 @@ +web: rails s +webpack: ./bin/webpack-dev-server diff --git a/README.md b/README.md index f8fe648a14..4b5de8d599 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,12 @@ To compile assets in runtime simply start the webpack server with: $ ./bin/webpack-dev-server ``` +You can run both the Rails server and Webpack simultaneously using Foreman: + +``` +$ foreman start +``` + ### Features - A powerful markup engine with pipeline (see [this blog post](https://lab.io/articles/2017/02/12/extending-markdown-with-middleware/) for details on how this works).