GeezerVison is showing github.com — Add .env support & moving from index.js · nullstack/nullstack@964df8b
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: package.json +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
22 | 22 | "body-parser": "^1.19.0", |
23 | 23 | "cors": "^2.8.5", |
24 | 24 | "css-loader": "^3.4.2", |
| 25 | + "dotenv": "^8.2.0", |
25 | 26 | "express": "^4.17.1", |
26 | 27 | "ignore-loader": "^0.1.2", |
27 | 28 | "mini-css-extract-plugin": "^0.9.0", |
|
Collapse file
Copy file name to clipboardExpand all lines: server/index.js +1-2Lines changed: 1 addition & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
1 | | - |
2 | | - |
| 1 | +import 'dotenv/config'; |
3 | 2 | import context from './context'; |
4 | 3 | import server from './server'; |
5 | 4 | import registry from './registry'; |
|
Collapse file
Copy file name to clipboard +4Lines changed: 4 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +NULLSTACK_SECRETS_KEY = 'secrets' |
| 2 | +NULLSTACK_SECRETS_CAMELIZED_KEY = 'secrets' |
| 3 | +NULLSTACK_SETTINGS_KEY = 'settings' |
| 4 | +NULLSTACK_SETTINGS_CAMELIZED_KEY = 'settings' |
Collapse file
Copy file name to clipboardExpand all lines: tests/.gitignore +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -2,4 +2,5 @@ node_modules/ |
2 | 2 | .development/ |
3 | 3 | .production/ |
4 | 4 | package-lock.json |
5 | | -yarn.lock |
| 5 | +yarn.lock |
| 6 | +# .env # never forget to add this in real life |
Collapse file
Copy file name to clipboardExpand all lines: tests/index.js -7Lines changed: 0 additions & 7 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
1 | | -if(typeof process !== 'undefined') { |
2 | | - process.env.NULLSTACK_SECRETS_KEY = 'secrets'; |
3 | | - process.env.NULLSTACK_SECRETS_CAMELIZED_KEY = 'secrets'; |
4 | | - process.env.NULLSTACK_SETTINGS_KEY = 'settings'; |
5 | | - process.env.NULLSTACK_SETTINGS_CAMELIZED_KEY = 'settings'; |
6 | | -} |
7 | | - |
8 | 1 | import Nullstack from 'nullstack'; |
9 | 2 | import Application from './src/Application'; |
10 | 3 |
|
|