Sha256: b9b86373e69976de96379dff1ba8362dbdf96068d5e9190521c6ecb8a28b4d89
Contents?: true
Size: 367 Bytes
Versions: 1
Compression:
Stored size: 367 Bytes
Contents
# frozen_string_literal: true require 'bundler/setup' require 'preval' require 'sinatra' Preval::Visitors::Arithmetic.enable! Preval::Visitors::Loops.enable! Preval::Visitors::Micro.enable! 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 end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
preval-0.3.0 | docs/server.rb |