juxscript 1.1.269 → 1.1.270
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 +3 -4
- package/package.json +1 -1
package/machinery/serve.js
CHANGED
|
@@ -109,12 +109,11 @@ app.get('/favicon.png', (req, res) => res.status(204).end());
|
|
|
109
109
|
// ═══════════════════════════════════════════════════════════════
|
|
110
110
|
// API ROUTES — BEFORE static and catch-all
|
|
111
111
|
// ═══════════════════════════════════════════════════════════════
|
|
112
|
-
|
|
113
|
-
const fruits = ['apple', 'banana', 'orange', 'mango', 'strawberry', 'grape', 'watermelon', 'pineapple', 'kiwi', 'peach'];
|
|
114
|
-
const randomFruit = fruits[Math.floor(Math.random() * fruits.length)];
|
|
112
|
+
const FRUITS = ['mango', 'blueberry', 'raspberry', 'kiwi', 'pineapple', 'strawberry', 'banana', 'papaya', 'guava', 'dragonfruit'];
|
|
115
113
|
|
|
114
|
+
app.get('/api/test', (req, res) => {
|
|
116
115
|
res.json({
|
|
117
|
-
randomFruit,
|
|
116
|
+
randomFruit: FRUITS[Math.floor(Math.random() * FRUITS.length)],
|
|
118
117
|
users: [
|
|
119
118
|
{ id: 1, name: 'Alice', email: 'alice@example.com' },
|
|
120
119
|
{ id: 2, name: 'Bob', email: 'bob@example.com' },
|