Skip to content

Commit 6f12d51

Browse files
committed
Remove unused server.js file
1 parent 971b56d commit 6f12d51

File tree

8 files changed

+30
-28
lines changed

8 files changed

+30
-28
lines changed

.env-sample

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
API_HOST=http://0.0.0.0:8888

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,5 @@ node_modules
2828

2929
# Bower
3030
bower_components/
31+
32+
.env

package-lock.json

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
"compass-mixins": "jmwohl/compass-mixins",
8484
"core-js": "^2.0.0",
8585
"cross-storage": "^1.0.0",
86+
"dotenv-webpack": "^1.7.0",
8687
"faye": "^1.1.2",
8788
"glslCanvas": "^0.1.7",
8889
"i": "^0.3.6",

server.js

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/components/common/InfiniteMasonryComponent.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ import { Waypoint } from 'react-waypoint';
66
// import Spinner from 'react-spin';
77
import { throttle } from 'lodash';
88

9-
import config from 'config';
10-
119
require('styles//common/InfiniteMasonry.scss');
1210

1311
const masonryOptions = {

src/sources/fetchJSON.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {getToken} from '../services/auth';
1010
* @return {String}
1111
*/
1212
function prependApiBase(url) {
13-
return `${config.apiBase}${url}`;
13+
return `${process.env.API_HOST}${url}`;
1414
}
1515

1616
/**

webpack.dev.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/* eslint-disable import/no-extraneous-dependencies */
22
const path = require('path')
33
const webpack = require('webpack')
4-
// const HtmlWebpackPlugin = require('html-webpack-plugin')
54
const packagejson = require('./package.json')
65
const defaultSettings = require('./cfg/defaults');
76
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
87
const HtmlWebpackPlugin = require('html-webpack-plugin')
8+
const Dotenv = require('dotenv-webpack')
99

1010
module.exports = (env, argv) => {
1111

@@ -100,10 +100,6 @@ module.exports = (env, argv) => {
100100
test: /\.(svg)$/,
101101
loader: 'url-loader'
102102
},
103-
// {
104-
// test: /\.(mp4|ogg)$/,
105-
// loader: 'file-loader'
106-
// },
107103
{
108104
test: /\.(js|jsx)$/,
109105
loader: 'babel-loader',
@@ -116,11 +112,12 @@ module.exports = (env, argv) => {
116112
},
117113

118114
plugins: [
115+
new Dotenv({
116+
systemvars: true
117+
}),
119118
new webpack.DefinePlugin({
120119
'process.env': {
121120
CLIENT_ENV: JSON.stringify('development'),
122-
// API_HOST: JSON.stringify(process.env.API_HOST || 'http://0.0.0.0:8888'),
123-
API_HOST: JSON.stringify(process.env.API_HOST || 'https://api.openframe.io/v0/'),
124121
VERSION: JSON.stringify(packagejson.version)
125122
}
126123
}),

0 commit comments

Comments
 (0)