diff options
Diffstat (limited to 'src/server/config/database.js')
-rw-r--r-- | src/server/config/database.js | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/src/server/config/database.js b/src/server/config/database.js deleted file mode 100644 index a413f7050..000000000 --- a/src/server/config/database.js +++ /dev/null | |||
@@ -1,83 +0,0 @@ | |||
1 | |||
2 | /** @type {import('@adonisjs/framework/src/Env')} */ | ||
3 | const Env = use('Env'); | ||
4 | |||
5 | const dbPath = process.env.DB_PATH; | ||
6 | |||
7 | module.exports = { | ||
8 | /* | ||
9 | |-------------------------------------------------------------------------- | ||
10 | | Default Connection | ||
11 | |-------------------------------------------------------------------------- | ||
12 | | | ||
13 | | Connection defines the default connection settings to be used while | ||
14 | | interacting with SQL databases. | ||
15 | | | ||
16 | */ | ||
17 | connection: Env.get('DB_CONNECTION', 'sqlite'), | ||
18 | |||
19 | /* | ||
20 | |-------------------------------------------------------------------------- | ||
21 | | Sqlite | ||
22 | |-------------------------------------------------------------------------- | ||
23 | | | ||
24 | | Sqlite is a flat file database and can be a good choice for a development | ||
25 | | environment. | ||
26 | | | ||
27 | | npm i --save sqlite3 | ||
28 | | | ||
29 | */ | ||
30 | sqlite: { | ||
31 | client: 'sqlite3', | ||
32 | connection: { | ||
33 | // filename: Helpers.databasePath(`${Env.get('DB_DATABASE', 'development')}.sqlite`), | ||
34 | filename: dbPath, | ||
35 | }, | ||
36 | useNullAsDefault: true, | ||
37 | debug: Env.get('DB_DEBUG', false), | ||
38 | }, | ||
39 | |||
40 | /* | ||
41 | |-------------------------------------------------------------------------- | ||
42 | | MySQL | ||
43 | |-------------------------------------------------------------------------- | ||
44 | | | ||
45 | | Here we define connection settings for MySQL database. | ||
46 | | | ||
47 | | npm i --save mysql | ||
48 | | | ||
49 | */ | ||
50 | mysql: { | ||
51 | client: 'mysql', | ||
52 | connection: { | ||
53 | host: Env.get('DB_HOST', 'localhost'), | ||
54 | port: Env.get('DB_PORT', ''), | ||
55 | user: Env.get('DB_USER', 'root'), | ||
56 | password: Env.get('DB_PASSWORD', ''), | ||
57 | database: Env.get('DB_DATABASE', 'adonis'), | ||
58 | }, | ||
59 | debug: Env.get('DB_DEBUG', false), | ||
60 | }, | ||
61 | |||
62 | /* | ||
63 | |-------------------------------------------------------------------------- | ||
64 | | PostgreSQL | ||
65 | |-------------------------------------------------------------------------- | ||
66 | | | ||
67 | | Here we define connection settings for PostgreSQL database. | ||
68 | | | ||
69 | | npm i --save pg | ||
70 | | | ||
71 | */ | ||
72 | pg: { | ||
73 | client: 'pg', | ||
74 | connection: { | ||
75 | host: Env.get('DB_HOST', 'localhost'), | ||
76 | port: Env.get('DB_PORT', ''), | ||
77 | user: Env.get('DB_USER', 'root'), | ||
78 | password: Env.get('DB_PASSWORD', ''), | ||
79 | database: Env.get('DB_DATABASE', 'adonis'), | ||
80 | }, | ||
81 | debug: Env.get('DB_DEBUG', false), | ||
82 | }, | ||
83 | }; | ||