aztomiq 1.0.3 → 1.0.4
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/package.json +1 -1
- package/server.js +5 -4
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -11,9 +11,10 @@ const app = express();
|
|
|
11
11
|
const PORT = 3000;
|
|
12
12
|
|
|
13
13
|
// Configuration
|
|
14
|
-
const
|
|
14
|
+
const PROJECT_ROOT = process.env.AZTOMIQ_PROJECT_ROOT || process.cwd();
|
|
15
|
+
const SRC_DIR = path.join(PROJECT_ROOT, 'src');
|
|
15
16
|
const FEATURES_DIR = path.join(SRC_DIR, 'features');
|
|
16
|
-
const DIST_DIR = path.join(
|
|
17
|
+
const DIST_DIR = path.join(PROJECT_ROOT, 'dist-dev');
|
|
17
18
|
|
|
18
19
|
app.use(cors());
|
|
19
20
|
app.use(bodyParser.json());
|
|
@@ -59,7 +60,7 @@ app.post('/api/features/:id', (req, res) => {
|
|
|
59
60
|
console.log(`📝 Updated config for ${id}`);
|
|
60
61
|
|
|
61
62
|
console.log('🔄 Triggering rebuild...');
|
|
62
|
-
exec('
|
|
63
|
+
exec('npx aztomiq build', { cwd: PROJECT_ROOT }, (error, stdout, stderr) => {
|
|
63
64
|
if (error) console.error(`Build error: ${error}`);
|
|
64
65
|
else console.log(`✅ Build complete`);
|
|
65
66
|
});
|
|
@@ -95,7 +96,7 @@ app.post('/api/global', (req, res) => {
|
|
|
95
96
|
console.log(`📝 Updated Global Config`);
|
|
96
97
|
|
|
97
98
|
console.log('🔄 Triggering rebuild...');
|
|
98
|
-
exec('
|
|
99
|
+
exec('npx aztomiq build', { cwd: PROJECT_ROOT }, (error, stdout, stderr) => {
|
|
99
100
|
if (error) console.error(`Build error: ${error}`);
|
|
100
101
|
else console.log(`✅ Build complete`);
|
|
101
102
|
});
|