Skip to content

Commit f17a093

Browse files
authored
Merge pull request #1 from dlebedynskyi/next
Next
2 parents 1efb4b2 + 572cdec commit f17a093

23 files changed

+91
-289
lines changed

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
end_of_line = lf
9+
insert_final_newline = true
10+
charset = utf-8
11+
indent_style = space
12+
indent_size = 2
13+
trim_trailing_whitespace = true

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PORT=5001
22
DEV_ASSETS_PORT=5000
33
PROTOCOL=http
4-
WEBSITE_HOSTNAME=localhost:5001
4+
HOSTNAME=localhost
55

66
STATIC_CACHE_DURATION=2592000000
77
DYNAMIC_CACHE_DURATION=5
File renamed without changes.

src/config/assets.js renamed to config/assets.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ module.exports = () => {
1111
const stylesheet = [];
1212
const file = fs.readFileSync(WEBPACK_ASSET_FILE_PATH, 'utf8');
1313
const assets = file ? JSON.parse(file) : null;
14-
log('assets', assets);
1514
if (!file || !assets) {
1615
log('Assets file was not found. Expected ', file);
1716
return {javascript, stylesheet};
@@ -28,8 +27,8 @@ module.exports = () => {
2827
stylesheet.push(assets[k].css);
2928
}
3029
});
31-
30+
3231
const result = {javascript, stylesheet};
33-
log(result);
32+
log('building assets set', result);
3433
return result;
3534
};
File renamed without changes.

src/config/environment.js renamed to config/environment.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ if (configValue.environment === 'development') {
1919

2020
configValue.port = getEnvOrDefault('PORT', 5001);
2121
configValue.protocol = getEnvOrDefault('PROTOCOL', 'http');
22-
configValue.host = getEnvOrDefault('WEBSITE_HOSTNAME');
22+
configValue.hostname = getEnvOrDefault('HOSTNAME', 'localhost');
2323

2424
configValue.staticAssetsCache = getEnvOrDefault('STATIC_CACHE_DURATION', 1000 * 60 * 60 * 24 * 30); // 30 days
25-
configValue.dynamicCache = getEnvOrDefault('DYNAMIC_CACHE_DURATION', 0); // 0 sec
25+
configValue.dynamicCache = getEnvOrDefault('DYNAMIC_CACHE_DURATION', 0); // 0 ms
2626

2727
configValue.contentDir =
2828
configValue.environment === 'development' ?
@@ -31,9 +31,6 @@ configValue.contentDir =
3131

3232
debug.enable(process.env.DEBUG);
3333

34-
const log = debug('react-playground:Environment:');
35-
log(configValue);
36-
3734
module.exports = configValue;
3835

3936
function getEnvOrDefault(key, defaultValue) {
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)