Skip to content

Move main() out of index.ts #350

@matthewrobertson

Description

@matthewrobertson

Currently our bin scripts point to the same root index.ts file that exposes our public API. The implication is that developers cannot import {foo} from "@google-cloud/functions-framework" without spinning up the webserver. This adds some complexity to local development and testing workflows.

I think a reasonable change would be to extract the initialization logic into a separate file (eg main.ts) that spins up the webserver. Then update our bin scripts to point to that file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions