5htp 0.0.6-3 → 0.0.6-4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/utils/config.ts +20 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "5htp",
|
|
3
3
|
"description": "5-HTP, scientifically called 5-Hydroxytryptophan, is the precursor of happiness neurotransmitter.",
|
|
4
|
-
"version": "0.0.6-
|
|
4
|
+
"version": "0.0.6-4",
|
|
5
5
|
"author": "Gaetan Le Gac (https://github.com/gaetanlegac)",
|
|
6
6
|
"repository": "git://github.com/gaetanlegac/5htp-cli.git",
|
|
7
7
|
"license": "MIT",
|
package/src/utils/config.ts
CHANGED
|
@@ -33,8 +33,26 @@ export default class ConfigParser {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
public env() {
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
// We assume that when we run 5htp dev, we're in local
|
|
37
|
+
// Otherwise, we're in production environment (docker)
|
|
38
|
+
console.log("Using environment:", process.env.NODE_ENV);
|
|
39
|
+
return process.env.NODE_ENV === 'development' ? {
|
|
40
|
+
name: 'local',
|
|
41
|
+
profile: 'dev',
|
|
42
|
+
level: 'silly',
|
|
43
|
+
|
|
44
|
+
localIP: '86.76.176.80',
|
|
45
|
+
domain: 'localhost:3010',
|
|
46
|
+
url: 'http://localhost:3010',
|
|
47
|
+
} : {
|
|
48
|
+
name: 'server',
|
|
49
|
+
profile: 'prod',
|
|
50
|
+
level: 'silly',
|
|
51
|
+
|
|
52
|
+
localIP: '86.76.176.80',
|
|
53
|
+
domain: 'megacharger.io',
|
|
54
|
+
url: 'https://megacharger.io',
|
|
55
|
+
}
|
|
38
56
|
}
|
|
39
57
|
|
|
40
58
|
public identity() {
|