-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverConfig.js
67 lines (52 loc) · 1.55 KB
/
serverConfig.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// config used by server side only
const dbHost = process.env.DB_HOST || "127.0.0.1";
const dbPort = process.env.DB_PORT || 27017;
const dbName = process.env.DB_NAME || "shop";
const dbUser = process.env.DB_USER || "";
const dbPass = process.env.DB_PASS || "";
const dbCred =
dbUser.length > 0 || dbPass.length > 0 ? `${dbUser}:${dbPass}@` : "";
const dbUrl =
process.env.DB_URL || `mongodb://${dbCred}${dbHost}:${dbPort}/${dbName}`;
module.exports = {
// used by Store (server side)
apiBaseUrl: `http://localhost:3001/api/v1`,
// used by Store (server and client side)
ajaxBaseUrl: `http://localhost:3001/ajax`,
// Access-Control-Allow-Origin
storeBaseUrl: `http://localhost:3000`,
// used by API
adminLoginUrl: "/admin/login",
apiListenPort: 3001,
storeListenPort: 3000,
// used by API
mongodbServerUrl: dbUrl,
smtpServer: {
host: "",
port: 0,
secure: true,
user: "",
pass: "",
fromName: "",
fromAddress: ""
},
// key to sign tokens
jwtSecretKey: "-",
// path to uploads
categoriesUploadPath: "../admin/public/images/categories",
productsUploadPath: "../admin/public/images/products",
filesUploadPath: "../admin/public",
themeAssetsUploadPath: "theme/assets/images",
// url to uploads
categoriesUploadUrl: "/images/categories",
productsUploadUrl: "/images/products",
filesUploadUrl: "",
// store UI language
language: "en",
// used by API
orderStartNumber: 1000,
developerMode: true,
adminEmail: "admin@capi.com",
// please change this
adminInitialPassword: "admin"
};