Sha256: e3fdc18e21c01d1ea6ee1b79fb84e74339783e81616861f490765b9415a83f3f

Contents?: true

Size: 861 Bytes

Versions: 1

Compression:

Stored size: 861 Bytes

Contents

# -p 8888

ENV['RACK_ENV'] ||= 'development'
Bundler.setup(:default, ENV['RACK_ENV'])
Bundler.require(:default, ENV['RACK_ENV'])

# Want to take advantage of some of the Praxis' extensions for:
# API field selection (a la GraphQL) - for querying and rendering
# API filtering extensions (to add "where clauses") in listings
# Views and partial rendering (for ActiveRecord models)

require 'praxis/plugins/mapper_plugin'
require 'praxis/mapper/active_model_compat'
require 'praxis/extensions/field_selection'
require 'praxis/plugins/pagination_plugin'

# Start the sqlite DB
case ENV['RACK_ENV']
when 'test'
  ActiveRecord::Base.establish_connection(
    adapter:  'sqlite3',
    database: ':memory:'
  )
else
  ActiveRecord::Base.establish_connection(
    adapter:  'sqlite3',
    database: "development.sqlite3"
  )
end

run Praxis::Application.instance.setup

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
praxis-2.0.pre.10 tasks/thor/templates/generator/example_app/config.ru