Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: add node_bundler=esbuild for jas-tags and stretched-paintings functions

The nanoid v4+ package is ESM-only and breaks when Netlify's default
bundler wraps it in require(). Adding esbuild bundler config (like other
functions) fixes the 502 errors.

Also reverts API_BASE to relative paths since domain-scoped redirects
in netlify.toml handle routing correctly.

+3 -1
+2
system/netlify.toml
··· 145 145 146 146 [functions.stretched-paintings] 147 147 # justanothersystem.org - Stretched paintings CRUD API (admin: @jeffrey only) 148 + node_bundler = "esbuild" 148 149 external_node_modules = ["mongodb", "mongodb-connection-string-url", "nanoid", "@aws-sdk/client-s3", "@aws-sdk/s3-request-presigner"] 149 150 included_files = ["backend/**/*.mjs"] 150 151 included_env_vars = ["CONTEXT", "ADMIN_SUB", "AUTH0_M2M_CLIENT_ID", "AUTH0_M2M_SECRET", "MONGODB_CONNECTION_STRING", "MONGODB_NAME", "ART_KEY", "ART_SECRET", "ART_ENDPOINT", "ART_SPACE_NAME", "DO_SPACES_KEY", "DO_SPACES_SECRET"] 151 152 152 153 [functions.jas-tags] 153 154 # justanothersystem.org - Tags/labels CRUD API (admin: @jeffrey only) 155 + node_bundler = "esbuild" 154 156 external_node_modules = ["mongodb", "mongodb-connection-string-url", "nanoid"] 155 157 included_files = ["backend/**/*.mjs"] 156 158 included_env_vars = ["CONTEXT", "ADMIN_SUB", "AUTH0_M2M_CLIENT_ID", "AUTH0_M2M_SECRET", "MONGODB_CONNECTION_STRING", "MONGODB_NAME"]
+1 -1
system/public/justanothersystem.org/index.html
··· 689 689 <script> 690 690 // ====== Configuration ====== 691 691 const isDev = window.location.hostname === 'localhost' || window.location.hostname.includes('local.'); 692 - const API_BASE = isDev ? 'https://localhost:8888' : 'https://aesthetic.computer'; 692 + const API_BASE = isDev ? 'https://localhost:8888' : ''; 693 693 const API_URL = `${API_BASE}/api/stretched-paintings`; 694 694 const TAGS_URL = `${API_BASE}/api/jas-tags`; 695 695