Sha256: 9db1bbe82761cbfb7b3836aac32e1d60e6a8872fb2db10f9ef540ca93a96b6f5

Contents?: true

Size: 557 Bytes

Versions: 6

Compression:

Stored size: 557 Bytes

Contents

module FaaStRuby
  module Local
    def self.start!(sync: false, deploy_env: 'stage', debug: false)
      Thread.new do
        env = {
          'SYNC' => sync,
          'DEPLOY_ENVIRONMENT' => deploy_env
        }
        cmd = []
        cmd << "SYNC=true" if sync
        cmd << "DEBUG=true" if debug
        cmd << "DEPLOY_ENVIRONMENT=#{deploy_env}"
        cmd << "faastruby watch"
        5.times do
          system(cmd.join(" "))
          sleep 1
        end
        puts "FaaStRuby Local exited. Please press CTRL+C."
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
faastruby-0.5.6 lib/faastruby/server/local.rb
faastruby-0.5.5 lib/faastruby/server/local.rb
faastruby-0.5.4 lib/faastruby/server/local.rb
faastruby-0.5.3 lib/faastruby/server/local.rb
faastruby-0.5.2 lib/faastruby/server/local.rb
faastruby-0.5.0 lib/faastruby/server/local.rb