forked from steemit/condenser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
52 lines (43 loc) · 1.8 KB
/
index.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
import * as steem from 'steem';
delete process.env.BROWSER;
const path = require('path');
const ROOT = path.join(__dirname, '..');
// Tell `require` calls to look into `/app` also
// it will avoid `../../../../../` require strings
process.env.NODE_PATH = path.resolve(__dirname, '..');
require('module').Module._initPaths();
// Load Intl polyfill
// require('utils/intl-polyfill')(require('./config/init').locales);
import config from 'config';
global.$STM_Config = {
fb_app: config.get('grant.facebook.key'),
ws_connection_client: config.get('ws_connection_client'),
ws_connection_server: config.get('ws_connection_server'),
img_proxy_prefix: config.get('img_proxy_prefix'),
ipfs_prefix: config.get('ipfs_prefix'),
disable_signups: config.get('disable_signups'),
read_only_mode: config.get('read_only_mode'),
registrar_fee: config.get('registrar.fee'),
upload_image: config.get('upload_image'),
site_domain: config.get('site_domain'),
facebook_app_id: config.get('facebook_app_id'),
google_analytics_id: config.get('google_analytics_id')
};
const WebpackIsomorphicTools = require('webpack-isomorphic-tools');
const WebpackIsomorphicToolsConfig = require(
'../webpack/webpack-isotools-config'
);
global.webpackIsomorphicTools = new WebpackIsomorphicTools(
WebpackIsomorphicToolsConfig
);
global.webpackIsomorphicTools.server(ROOT, () => {
steem.config.set('websocket', config.get('ws_connection_server'))
// const CliWalletClient = require('shared/api_client/CliWalletClient').default;
// if (process.env.NODE_ENV === 'production') connect_promises.push(CliWalletClient.instance().connect_promise());
try {
require('./server');
} catch (error) {
console.error(error);
process.exit(1);
}
});