Skip to content

App engine hello world example too many dependencies #1247

Closed

Description

@randomekek

Hello, the hello app engine hello world seems to depend on express. Please remove the dependency, as hello world should always be as succinct as possible for pedagogical purposes!

Is google-cloud/nodejs-repo-tools even strictly necessary?

const http = require('http');
const PORT = process.env.PORT || 8080;

const server = http.createServer((request, response) => {
  console.log(request.url);
  response.end('Hello Node.js Server!');
});

server.listen(PORT, err => {
  console.log(`App listening on port ${PORT}`);
  console.log('Press Ctrl+C to quit.');
});

Activity

  1. fhinkel commented on Apr 24, 2019

    @fhinkel
    Contributor

    I agree, npm install takes a long time considering this is just hello-world.

    We use @google-cloud/nodejs-repo-tools for the tests. We're in the process of simplifying this.

  2. reopened this on May 2, 2019
  3. quantuminformation commented on May 25, 2019

    @quantuminformation

    Also points to deprecated npm install -g @google-cloud/functions-emulator
    and doesn't inform you how to set the project: ie

    ➜  helloworld git:(master) gcloud functions deploy helloGET --runtime nodejs8 --trigger-http
    
    ERROR: (gcloud.functions.deploy) Error parsing [name].
    The [function] resource is not properly specified.
    Failed to find attribute [project]. The attribute can be set in the following ways:
    - provide the argument [--project] on the command line
    - set the property [core/project]
    ➜  helloworld git:(master)
    
  4. quantuminformation commented on May 25, 2019

    @quantuminformation

    But thanks for these examples, glad I don't have to depend on Serverless framework now, just another layer than can go wrong.

  5. grant commented on Jun 11, 2019

    @grant
    Contributor

    @ace-n, can you look at the @google-cloud/functions-emulator dependency? Is that effort tracked somewhere?

  6. ace-n commented on Jun 11, 2019

    @ace-n
    Contributor

    This is more-or-less tracked in #1333. (Right now, this is blocked on fully updating the functions tests per [Google internal] b/134942934. Once that's done, it would probably only take 1-2 reasonable-sized PRs.)

    This is also vaguely on my radar. My task queue is currently 100% full however, so it'll likely be at least a few weeks before I have time to look at this. (You're welcome to beat me to it, of course.)

  7. assigned and unassigned on Jul 16, 2019
  8. fhinkel commented on Jul 16, 2019

    @fhinkel
    Contributor

    I'm working on removing nodejs-repo-tools for testing hello-world

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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