Skip to content

Replace serverless-offline with a local backend server - #125

Merged
jh0ker merged 4 commits into
dev/proxy-configfrom
dev/local-backend
Oct 12, 2026
Merged

jh0ker merged 4 commits into
dev/proxy-configfrom
dev/local-backend

Conversation

@jh0ker

@jh0ker jh0ker commented Oct 6, 2026

Copy link
Copy Markdown
Member

yarn start:backend now runs a small local Express server instead of serverless-offline, and the Serverless Framework is removed.

  • Local backend: src/backend/local/ calls the same three Lambda handlers as the CDK stack. esbuild rebuilds and restarts it on changes. The bundle goes to node_modules/.cache/backend/.
  • Tests: yarn test:backend runs HTTP tests against the handlers with mocked S3 (save, upload, sharing, request validation, storage errors). It includes a regression test for saving with an existing id; the frontend fix for that is in the separate regression-fixes PR.
  • URL signing: the handlers use getSignedUrlPromise. The synchronous getSignedUrl can't wait for credentials that load asynchronously, such as the SSO profiles used locally.
  • Error handling: only NotFound and NoSuchKey count as a missing object. Other errors, such as access denied, now propagate instead of being treated as missing. The deployed Lambdas have s3:List* through grants.readWrite, so missing objects still return 404 there.
  • Serverless removed: its dependencies, serverless.yml, the deploy:* scripts and scripts/deploy-frontend.sh are deleted. Deployment uses CDK, and none of these could run anymore.
  • Netlify: webpack.backend.js stays for the Netlify functions build, minus its serverless-webpack entries.

Tested: yarn test:backend (20 tests), starting the backend and checking /health, yarn build:backend:netlify.

@jh0ker
jh0ker added this pull request to stack #127 October 6, 2026 15:37
@jh0ker jh0ker mentioned this pull request Oct 6, 2026
@netlify

netlify Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for serene-narwhal-9b7b1c ready!

Name Link
🔨 Latest commit 420a6b6
🔍 Latest deploy log https://app.netlify.com/projects/serene-narwhal-9b7b1c/deploys/6acd03a19c090eebdcca5e3f
😎 Deploy Preview https://deploy-preview-125--serene-narwhal-9b7b1c.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for peaceful-raindrop-cb2462 ready!

Name Link
🔨 Latest commit 420a6b6
🔍 Latest deploy log https://app.netlify.com/projects/peaceful-raindrop-cb2462/deploys/6acd03a19c090eebdcca5e43
😎 Deploy Preview https://deploy-preview-125--peaceful-raindrop-cb2462.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@jh0ker
jh0ker force-pushed the dev/local-backend branch from d7ad297 to 6516bb2 Compare October 6, 2026 15:51
@jh0ker
jh0ker force-pushed the dev/local-backend branch 2 times, most recently from de57dc0 to fa293e4 Compare October 6, 2026 17:08
@jh0ker
jh0ker force-pushed the dev/local-backend branch from fa293e4 to b9b40a0 Compare October 7, 2026 11:33
@jh0ker
jh0ker marked this pull request as ready for review October 7, 2026 11:41
@colorchestra

Copy link
Copy Markdown
Collaborator

🚀

@jh0ker
jh0ker force-pushed the dev/local-backend branch from b9b40a0 to 33000da Compare October 12, 2026 15:54
The Serverless deploy scripts and config cannot run anymore; deployment
uses CDK. serverless-offline is replaced by the local backend server.
webpack.backend.js stays for the Netlify functions build, without the
serverless-webpack entries.
@jh0ker
jh0ker force-pushed the dev/local-backend branch from 33000da to 420a6b6 Compare October 12, 2026 15:58
@jh0ker
jh0ker merged commit 974af13 into develop Oct 12, 2026
4 checks passed
@jh0ker
jh0ker deleted the dev/local-backend branch October 12, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants