Sha256: b89f679c7f4a8dc3a34d27f7f72060412c0e010ce156acbf0c01850b7ed549ac

Contents?: true

Size: 357 Bytes

Versions: 2

Compression:

Stored size: 357 Bytes

Contents

require 'blog-mongodb'

Capcode.run( :port => 3001, :host => "localhost", :db_config => "blog-mongodb.yml" ) do |c|
  admin = User.find_by_login( "admin" )
  if admin.nil?
    puts "Create admin user..."
    admin = User.create( :login => "admin", :passwd => "admin" )
  end
  puts "Admin user : \n\tlogin = #{admin.login}\n\tpassword = #{admin.passwd}"
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
capcode-base-mongoid-0.1.0 examples/blog-mongodb-run.rb
Capcode-0.8.9 examples/blog-mongodb-run.rb