daily pastebin goal
78%
SHARE
TWEET

Untitled

a guest Aug 10th, 2018 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ##
  2. # A MySQL connection:
  3. # DataMapper.setup(:default, 'mysql://user:password@localhost/the_database_name')
  4. #
  5. # # A Postgres connection:
  6. # DataMapper.setup(:default, 'postgres://user:password@localhost/the_database_name')
  7. #
  8. # # A Sqlite3 connection
  9. # DataMapper.setup(:default, "sqlite3://" + Padrino.root('db', "development.db"))
  10. #
  11.  
  12.  
  13. DataMapper.logger = logger
  14.  
  15. case Padrino.env
  16.   when :development then DataMapper.setup(:default, "sqlite3://" + Padrino.root('db', "testproj_development.db"))
  17.   when :production  then DataMapper.setup(:default, "sqlite3://" + Padrino.root('db', "testproj_production.db"))
  18.   when :test        then DataMapper.setup(:default, "sqlite3://" + Padrino.root('db', "testproj_test.db"))
  19. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top