@aravinthan_p/appnest-engine 1.0.20 → 1.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/appnest-proxy/server.js +10 -4
- package/package.json +1 -1
package/appnest-proxy/server.js
CHANGED
|
@@ -80,12 +80,15 @@ let appInjectedEnv = {};
|
|
|
80
80
|
const startAppBackend = () => {
|
|
81
81
|
try {
|
|
82
82
|
// Start app-backend (Express)
|
|
83
|
+
const appBackendPrefix = appnestProjects['appnest-backend'];
|
|
84
|
+
const appBackendEnv = { ...process.env, ...appInjectedEnv, PORT: appBackendPort };
|
|
85
|
+
console.log('📦 Command: npm run dev --prefix', appBackendPrefix, '| env:', appBackendEnv);
|
|
83
86
|
appBackendProcess = spawn(
|
|
84
87
|
'npm',
|
|
85
|
-
['run', 'dev', '--prefix',
|
|
88
|
+
['run', 'dev', '--prefix', appBackendPrefix],
|
|
86
89
|
{
|
|
87
90
|
stdio: 'inherit',
|
|
88
|
-
env:
|
|
91
|
+
env: appBackendEnv,
|
|
89
92
|
}
|
|
90
93
|
);
|
|
91
94
|
console.log(`🚀 Starting app-backend... on port ${appBackendPort}`);
|
|
@@ -100,13 +103,16 @@ const startAppFrontend = () => {
|
|
|
100
103
|
try {
|
|
101
104
|
console.log('📂 App Injected Environment Variables :', appInjectedEnv);
|
|
102
105
|
console.log('📂 App Injected Environment Variables - CLIENT_SCRIPT_URL :', appInjectedEnv.CLIENT_SCRIPT_URL);
|
|
106
|
+
const appFrontendPrefix = appnestProjects['appnest-frontend'];
|
|
107
|
+
const appFrontendEnv = { ...process.env, PORT: appFrontendPort, CLIENT_SCRIPT_URL: appInjectedEnv.CLIENT_SCRIPT_URL };
|
|
108
|
+
console.log('📦 Command: npm run dev --prefix', appFrontendPrefix, '| env:', appFrontendEnv);
|
|
103
109
|
// Start app-frontend (React)
|
|
104
110
|
appFrontendProcess = spawn(
|
|
105
111
|
'npm',
|
|
106
|
-
['run', 'dev', '--prefix',
|
|
112
|
+
['run', 'dev', '--prefix', appFrontendPrefix],
|
|
107
113
|
{
|
|
108
114
|
stdio: 'inherit',
|
|
109
|
-
env:
|
|
115
|
+
env: appFrontendEnv,
|
|
110
116
|
}
|
|
111
117
|
);
|
|
112
118
|
console.log(`🚀 Starting app-frontend... on port ${appFrontendPort}`);
|