Sha256: f53d17ea709edeac232c481fea2393ad272a2cdf7e9478fcd3ef2565fef6d78a

Contents?: true

Size: 653 Bytes

Versions: 1

Compression:

Stored size: 653 Bytes

Contents

#!/usr/bin/env ruby
require 'nitro'

require 'basic'

include Nitro

# Because it's not synced by default on Windows
STDERR.sync = true if not STDERR.sync

# Assuming you set up a database with these values...
db_config = {
    :store => 'mysql',
    :name => 'basic',
    :user => 'basic',
    :password => 'basic'
}
Og.setup(db_config)

# Tell the AuthController which User class to create
# on new-user registration.
Auth::AuthController.user_class = Basic::User

# Set up the dispatcher, including an AuthController
# at /auth.
Server.map = {
    '/' => Basic::BasicController,
    '/auth' => Basic::AuthController
}

# Run the example.
Nitro.run()

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nitro-auth-0.2.0 examples/basic/run.rb