Sha256: ca62f7d9fa69c75ff02c9200f32d83ce604adba8e4ce61a33e6049d1898cb1de
Contents?: true
Size: 323 Bytes
Versions: 3
Compression:
Stored size: 323 Bytes
Contents
# frozen_string_literal: true require 'bundler/setup' require 'preval' require 'sinatra' Preval.enable_all! get '/' do send_file(File.expand_path('index.html', __dir__)) end post '/' do Preval.process(request.body.read || '').tap do |response| halt 422 unless response end rescue NoMethodError halt 422 end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
preval-0.6.1 | docs/server.rb |
preval-0.6.0 | docs/server.rb |
preval-0.5.0 | docs/server.rb |