-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdb_message.js
64 lines (57 loc) · 2.05 KB
/
db_message.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/**
* ================================================================
* * DATABASE CONFIGURATIONS
* ================================================================
*/
const attemptingToConnect = () => {
return `
=========================================================================
ATTEMPTING TO CONNECT TO MULTIPLE DATABASES...
-------------------------------------------------------------------------`
}
const attemptingToSync = () => {
return `
=========================================================================
ATTEMPTING TO SYNC MULTIPLE DATABASES...
-------------------------------------------------------------------------`
}
const listeningMessage = (PORT, MAIN_API_ROUTE) => {
return `
=========================================================================
App is currently listening... 🎶
Base URL: http://localhost:${PORT}${MAIN_API_ROUTE}
=========================================================================
`
}
const failedMessage = err => {
return `
=========================================================================
FAILED TO CONNECT TO THE DATABASE!
-------------------------------------------------------------------------
${err}
=========================================================================
Have you already done the following?
- Check the database credentials in ./src/config/config.js.
- Check connection in Datagrip.
- Have you created the database? You can check it on the Datagrip.
If you can't solve this, please contact the developer who is probably crying screaming shaking rn.
`
}
const noSyncMessage = () => {
return `
=========================================================================
Sync is disabled. All databases will not be synced.
If you want to sync, change SEQUELIZE_ALTER_SYNC=true in the .env file.
=========================================================================`
}
const syncFailedMessage = err => {
return err
}
module.exports = {
failedMessage,
syncFailedMessage,
attemptingToConnect,
attemptingToSync,
noSyncMessage,
listeningMessage,
}