Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ffissore/ogm-rails-console-example

The sample console (plain and rack-webconsole) shown at OpenGeekMeeting
https://github.com/ffissore/ogm-rails-console-example

Last synced: 1 day ago
JSON representation

The sample console (plain and rack-webconsole) shown at OpenGeekMeeting

Awesome Lists containing this project

README

        

== One console to rule the webapp

This is the ruby on rails version.

You can use to debug or change the state of your app.

To run it, set ruby up (see https://rvm.beginrescueend.com/), launch rake db:migrate then rails s

Then go to http://localhost:3000/console and start scripting.

During the demo, I've changed the database name. Try running these lines to discover how

ActiveRecord::Base.connection_config
ActiveRecord::Base.connection_pool.disconnect!

The console can even be accessed directly from bash, through curl

curl -X POST -d 'script=ActiveRecord::Base.connection_config' http://localhost:3000/console.text

To use rack-webconsole, switch to webconsole branch (git checkout webconsole), then at page http://localhost:3000/helloworlds press the ` char