-
-
Notifications
You must be signed in to change notification settings - Fork 223
Expand file tree
/
Copy pathenv.js
More file actions
40 lines (35 loc) · 1.09 KB
/
env.js
File metadata and controls
40 lines (35 loc) · 1.09 KB
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
const { join } = require('path');
const apiURLs = '/api';
const publicURLs = '/';
const environment = process.env.NODE_ENV || 'production';
const isProd = environment === 'production';
const isDev = environment === 'development';
const isStage = environment === 'stage';
const rootDir = join(__dirname, '../');
const srcDir = join(__dirname, '../src');
const webpackDir = join(__dirname, './');
const buildDir = join(__dirname, '../build');
const publicDir = join(__dirname, '../public');
const apiUrl = process.env.API_URL || apiURLs;
const publicUrl = process.env.PUBLIC_URL || publicURLs;
const uiVersion = process.env.UI_VERSION === 'sky' ? 'sky' : 'enterprise';
const title = uiVersion === 'enterprise' ? 'dstack' : 'dstack Sky';
const description =
'Get GPUs at the best prices and availability from a wide range of providers. No cloud ' +
'account of your own is required.\n';
module.exports = {
environment,
isProd,
isDev,
isStage,
rootDir,
webpackDir,
srcDir,
buildDir,
publicDir,
apiUrl,
publicUrl,
title,
description,
uiVersion,
};