Skip to content

Instantly share code, notes, and snippets.

@KlonD90
Created June 27, 2016 17:35
Show Gist options
  • Save KlonD90/2e530c21de4d1b1966d7fdf799629c24 to your computer and use it in GitHub Desktop.
Save KlonD90/2e530c21de4d1b1966d7fdf799629c24 to your computer and use it in GitHub Desktop.
mytar
#/usr/bin/tarantool
box.cfg{
listen= tonumber(os.getenv('TNT_PORT')),
snapshot_period = 3600,
snapshot_count = 10,
replication_source={"localhost:3303","localhost:3304"}
}
box.once('grant_user_right', function()
box.schema.user.grant('guest', 'read,write,execute', 'universe')
end)
box.once('counter', function()
local counter = box.schema.space.create('counter')
counter:create_index('primary', {type = 'TREE', unique = true, parts = {1, 'STR'}})
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment