8000 GitHub - vasil/database-yml: Configurable database setup for Sinatra
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

vasil/database-yml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

database-yml

Ruby on Rails like database setup for Sinatra.

Instalation

Within the Sinatra project create database-yml vendor directory and add the submodule:

mkdir -p vendor/database-yml
git submodule add git://github.com/vasil/database-yml.git vendor/database-yml

git submodule init
git submodule update

Create config/database.yml file, something like this:

development:
  adapter: sqlite3
  database: my_devel.db

test:
  adapter: sqlite3
  database: my_test.db

production:
  adapter: mysql
  host: localhost
  database: my_db
  username: my_username
  password: my_password

Add this line somewhere in your application

require "sinatra/database-yml"

About

Configurable database setup for Sinatra

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0