Local Apps Script Webapp and UI Emulation with gas-fakes

19 views
Skip to first unread message

Bruce Mcpherson

unread,
May 21, 2026, 5:20:44 AM (yesterday)  May 21
to Google Apps Script Community
 Developing and testing webapps/add-ons without leaving Node. here: https://ramblings.mcpher.com/local-apps-script-webapp-and-ui-emulation/

Bringing the Web App Home
At the heart of this update is the new  gas-fakes serve  command. This command spins up a local HTTP endpoint that routes requests directly to your doGet or doPost and other server side functions. This emulates the Apps Script environment, enabling a “save and refresh” workflow that was previously impossible without constant cloud deployments.

Full Emulation

The local web server is not just a basic proxy; it includes deep support for the core components of GAS web development:
  • HtmlService Templating:  You can use standard templating syntax, such as <?!= myFunction() ?>, to manage your HTML assets locally.
  • Client-side RPC:  The google.script.run API is fully supported locally, ensuring your client-side scripts can communicate seamlessly with your server-side functions.
  • Visual UI Framing:  Calling SpreadsheetApp.getUi().showSidebar(html) will now automatically frame your HTML output inside a  visually accurate Workspace-style sidebar  directly in your local browser.
gas-fakes serve

Reply all
Reply to author
Forward
0 new messages