@hubspot/app-functions-dev-server
TypeScript icon, indicating that this package has built-in type declarations

0.9.0 • Public • Published

Overview

Serverless functions provide a way for private apps to run server-side code on HubSpot's infrastructure, typically to interact with HubSpot or third-party APIs on behalf of the app's React frontend that runs in a user's browser. Serverless functions for private apps are also called app functions.

The app functions dev server allows for app functions to run locally on a developer's machine instead of on HubSpot. This is useful for quick iterative development, epsecially when also running the React extension in local dev mode. However, there may differences between local and production execution.

Pre-requisites

  1. There is a project that contains the private app, which contains the app functions.
  2. The HubSpot CLI has been initialized for the project and a target account.
  3. The developer has a valid Personal Access Key (PAK) for the account. The PAK must contain at least the same scopes as those specified for the private app in the app.json file.
  4. If an app function requires a secret, the developer must supply a value for the secret using a .env file in the app.functions directory. This applies to the PRIVATE_APP_ACCESS_TOKEN, too. See dotenv for more information about .env files and their variants.

CAUTION: Add the pattern ".env*" to your .gitignore file so that secrets do not get committed to a repository by mistake. Hidden files are automatically ignored when using the CLI upload and watch commands.

Usage

Usage

app-functions-dev-server runs as part of the ui-extensions-dev-server. To run and develop this codebase, follow the contribution guidelines in the dev server repository.

Readme

Keywords

none

Package Sidebar

Install

npm i @hubspot/app-functions-dev-server

Weekly Downloads

7,479

Version

0.9.0

License

MIT

Unpacked Size

69.2 kB

Total Files

36

Last publish

Collaborators

  • camdenphalen
  • banderson
  • also
  • rberdeen-hubspot
  • harminder01
  • bkrainer-hs
  • friss
  • jhilker
  • atanasiuk
  • ksvirkou-hubspot
  • kbreeman-hubspot
  • brodgers16
  • jsines
  • bbarbosa-hubspot
  • kemmerle
  • service-ccs
  • tfinley_hs
  • jyeager_hubspot
  • tamarayu
  • arota-hubspot
  • hemangthakkar
  • mshannon_hs
  • amead_hs
  • elingyr
  • tscales
  • rsegura
  • jonmiller_hs
  • jedeen-hs
  • bmatto_hs
  • hweaverhubspot
  • bash-hs
  • asun1234
  • blamattina_hubspot