Noderize

Noderize

  • Docs
  • GitHub

›Guides

Get Started

  • Introduction
  • Create
  • Scripts
  • Examples

Configuration

  • Index
  • Noderize
  • Prettier
  • Jest

Features

  • Index
  • Modern JavaScript
  • Flow
  • TypeScript
  • Code Formatting
  • Testing
  • Linting

Guides

  • Index
  • Migrate
  • Publishing
  • Heroku
  • Firebase Cloud Functions
  • Google Cloud Functions

Tutorials

  • Index
  • Express
  • CLI

Guide: Google Cloud Functions

Deploy Google Cloud Functions is extremely simple with Noderize.

You will need a Google Cloud account with billing and the Cloud Functions API enabled, and the Google Cloud SDK installed.

First, create a Noderize project and cd into it.

Next, create a .gcloudignore file in the root of your project with the follow content:

.gcloudignore
.git
.gitignore
node_modules
#!include:.gitignore

!dist
src

Then, add a Function in your src/index.js:

export function helloWorld (req, res)  {
    res.send('Hello World!');
}

Build your app with yarn build or npm run build, then deploy with gcloud beta functions deploy helloWorld --trigger-http

This will take a minute or two, then output the app description.

Open the link under httpsTrigger.url, and you will see:

← Guide: Firebase Cloud FunctionsTutorials →
Noderize
Docs
Getting StartedConfigurationFeaturesGuidesTutorials
More
BlogGitHubStar
Copyright © 2018 Charles Crete.