summaryrefslogtreecommitdiff
path: root/knexfile.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2017-06-29 00:14:07 +0200
committerJules Laplace <julescarbon@gmail.com>2017-06-29 00:14:07 +0200
commita190d638c608f4352e3f01d72ed419a5ab5129ed (patch)
treedd6e7ea24c2ae4b6251f1ae2b609d9017acfd199 /knexfile.js
db stuff and initial app scaffold
Diffstat (limited to 'knexfile.js')
-rw-r--r--knexfile.js56
1 files changed, 56 insertions, 0 deletions
diff --git a/knexfile.js b/knexfile.js
new file mode 100644
index 0000000..1e7b5e9
--- /dev/null
+++ b/knexfile.js
@@ -0,0 +1,56 @@
+// Update with your config settings.
+
+require('dotenv').load()
+
+module.exports = {
+
+ development: {
+ client: 'mysql2',
+ connection: {
+ database: process.env.DB_NAME,
+ user: process.env.DB_USER,
+ password: process.env.DB_PASS
+ },
+ pool: {
+ min: 2,
+ max: 10
+ },
+ migrations: {
+ tableName: 'knex_migrations'
+ }
+ },
+
+ staging: {
+ client: 'mysql2',
+ connection: {
+ database: process.env.DB_NAME,
+ user: process.env.DB_USER,
+ password: process.env.DB_PASS
+ },
+ pool: {
+ min: 2,
+ max: 10
+ },
+ migrations: {
+ tableName: 'knex_migrations'
+ }
+ },
+
+ production: {
+ client: 'mysql2',
+ connection: {
+ database: process.env.DB_NAME,
+ user: process.env.DB_USER,
+ password: process.env.DB_PASS
+ },
+ pool: {
+ min: 2,
+ max: 10
+ },
+ migrations: {
+ tableName: 'knex_migrations'
+ }
+ }
+
+};
+