juxscript 1.1.257 → 1.1.259
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/machinery/serve.js +16 -0
- package/package.json +1 -1
package/machinery/serve.js
CHANGED
|
@@ -226,6 +226,22 @@ if (HOT_RELOAD) {
|
|
|
226
226
|
});
|
|
227
227
|
};
|
|
228
228
|
|
|
229
|
+
// Fake data API endpoint for testing
|
|
230
|
+
app.get('/api/test', (req, res) => {
|
|
231
|
+
res.json({
|
|
232
|
+
users: [
|
|
233
|
+
{ id: 1, name: 'Alice', email: 'alice@example.com' },
|
|
234
|
+
{ id: 2, name: 'Bob', email: 'bob@example.com' },
|
|
235
|
+
{ id: 3, name: 'Charlie', email: 'charlie@example.com' }
|
|
236
|
+
],
|
|
237
|
+
posts: [
|
|
238
|
+
{ id: 1, title: 'Hello World', userId: 1 },
|
|
239
|
+
{ id: 2, title: 'Testing JUX', userId: 2 }
|
|
240
|
+
],
|
|
241
|
+
timestamp: new Date().toISOString()
|
|
242
|
+
});
|
|
243
|
+
});
|
|
244
|
+
|
|
229
245
|
const compiler = new JuxCompiler({
|
|
230
246
|
srcDir: SRC_DIR,
|
|
231
247
|
distDir: DIST_DIR,
|