-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
development.js
77 lines (68 loc) · 3.7 KB
/
development.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
65
66
67
68
69
70
71
72
73
74
75
76
77
/**
* Development environment settings
*
* This file can include shared settings for a development team,
* such as API keys or remote database passwords. If you're using
* a version control solution for your Sails app, this file will
* be committed to your repository unless you add it to your .gitignore
* file. If your repository will be publicly viewable, don't add
* any private information to this file!
*
*/
module.exports = {
appName: 'My App (DEV)',
baseUrl: process.env.BASE_URL || 'https://myapi.app',
assetsUrl: process.env.ASSETS_URL || '', // Something like: https://my-cdn.app/ must end with / or be blank.
/***************************************************************************
* Set the default database connection for models in the development *
* environment (see config/datastores.js and config/models.js ) *
***************************************************************************/
datastores: {
default: {
host: process.env.DB_HOST || 'localhost', // To make sure we are on DEV, not PROD, we use shorthand variables, like DB_HOST, not DB_HOSTNAME,
user: process.env.DB_USER || 'root', // DB_USER, not DB_USERNAME
password: process.env.DB_PASS || 'mypass', // DB_PASS, not DB_PASSWORD
database: process.env.DB_NAME || 'myapp', // This discrepancy between DEV & PROD environment configuration variables has proven rather useful.
port: process.env.DB_PORT || 3306,
ssl: (process.env.DB_SSL !== 'false')
}
},
models: {
// This is set as safe, so remote development machines are behaving like remote production machines.
// It's also good practice, so one can document any needed updates to the schema for PROD prior to deployment.
// Use local.js to override locally. It is NOT recommended this change for any remote machines.
migrate: 'safe',
dataEncryptionKeys: {
// Setting as 'undefined' will fall back to the DEK defined in `models.js`.
default: (process.env.DATA_ENCRYPTION_KEY && process.env.DATA_ENCRYPTION_KEY.length && process.env.DATA_ENCRYPTION_KEY !== 'null') ? process.env.DATA_ENCRYPTION_KEY : undefined
}
},
// Disable all blueprint features.
// These are great tools for quick development, but
// this repo is already built with explicit actions, and routes.
// To prevent confusion / security issues down the line, just disable them all.
blueprints: {
actions: false,
routes: false,
shortcuts: false
},
security: {
/********************************************************************
* *
* This is a custom configuration option, for the request logger *
* hook (api/hook/request-logger.js) and the finalize request log *
* helper (api/helpers/finalize-request-log.js). *
* *
* If for some reason you need to debug sensitive info in your *
* request logs, you can set this to `true`. Will ALWAYS be `false` *
* on PRODUCTION environments. *
* *
********************************************************************/
requestLogger: {
logSensitiveData: false
}
},
session: {
secret: (process.env.SESSION_SECRET && process.env.SESSION_SECRET.length && process.env.SESSION_SECRET !== 'null') ? process.env.SESSION_SECRET : undefined,
}
};