You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pgfqe6ch8/lib/grack/bin/testserver

24 lines
577 B

#! /usr/bin/env ruby
libdir = File.absolute_path( File.join( File.dirname(__FILE__), '../lib' ) )
$LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)
Bundler.require(:default, :development)
require 'grack'
require 'rack'
root = File.absolute_path( File.join( File.dirname(__FILE__), '../examples' ) )
app = Grack::Server.new({
project_root: root,
upload_pack: true,
receive_pack:true
})
app1= Rack::Builder.new do
use Grack::Auth do |username, password|
[username, password] == ['123', '455']
end
run app
end
Rack::Server.start app: app1, Port: 3001