Created
June 18, 2014 01:08
-
-
Save thelinuxlich/9969d465d07e11ed9c39 to your computer and use it in GitHub Desktop.
Why Koa rox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(r, logger) { | |
return function * create_database(next) { | |
yield r.dbDrop("aidax"); | |
yield r.dbCreate("aidax"); | |
yield[ | |
r.tableCreate("clients"), | |
r.tableCreate("errors"), | |
r.tableCreate("forms"), | |
r.tableCreate("hits"), | |
r.tableCreate("interactions"), | |
r.tableCreate("scrolls"), | |
r.tableCreate("sessions"), | |
r.tableCreate("timings"), | |
r.tableCreate("visitors") | |
]; | |
yield r.table("clients").insert({ | |
key: "YOUR_KEY", | |
domains: [] | |
}); | |
yield next; | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment