Sha256: 0c2333b7521f1967da27afd96e4d16f8edc2c0848297fc83effacaed0c35dc0c
Contents?: true
Size: 1.02 KB
Versions: 8
Compression:
Stored size: 1.02 KB
Contents
#!/usr/bin/env ruby require 'rbbt/util/simpleopt' require 'rbbt/workflow' require 'zurb-foundation' require 'modular-scale' require 'rbbt/rest/main' require 'rbbt/rest/entity' require 'rbbt/rest/workflow' require 'rbbt/rest/file_server' require 'rbbt/rest/knowledge_base' require 'rbbt/rest/helpers' options = SOPT.get "-e--environment*:-p--port*:-s--server*:-b--bind*:-e--environment*" workflow = ARGV.first wf = Workflow.require_workflow workflow $title = wf.to_s load Rbbt.etc['app.d/init.rb'].find app = class WorkflowRest < Sinatra::Base; self end app.register Sinatra::RbbtRESTWorkflow app.get '/' do redirect to(File.join('/', wf.to_s)) end app.instance_eval Rbbt.etc['app.d/base.rb'].read app.use Rack::Deflater load Rbbt.etc['app.d/resources.rb'].find WorkflowRest.add_workflow wf, true WorkflowRest.port = options[:port] || 4567 WorkflowRest.bind = options[:bind] || "0.0.0.0" WorkflowRest.environment = options[:environment] || "development" WorkflowRest.server = options[:server] if options[:server] WorkflowRest.run!
Version data entries
8 entries across 8 versions & 1 rubygems