If you will know own documentation better you will understand me. But ok, I 
will explain to you.

if to follow on the link:
https://cloud.google.com/appengine/docs/standard/nodejs/building-app/deploying-web-service

there is phrase:
"Node.js modules are installed in the cloud as listed in your package.json
 and package-lock.json files and your service is started by using npm start.
"

That's if we will define "scripts" / "start" section in "package.json" then 
my service will started by this command.

I use such command to decrease use RAM and because my script called 
"index.js" instead of "server.js":
"scripts": {
 "start": "node --optimize_for_size --gc_interval=100 index.js"
}

But you didn't understand essence of the issue.

Ok, special for testing I created "hello-world" example without "scripts" 
section in "package.json" and only added to first line in "index.js" next 
command: "console.log(process.memoryUsage());"

When I execute it locally by next command "NODE_ENV=production npm start" I 
see in the console a following results:
{ rss: 20860928,
  heapTotal: 7159808,
  heapUsed: 4417056,
  external: 8224 }

But when it deployed it logs a following results:

{ rss: 55054336, 
heapTotal: 7159808, 
A    heapUsed: 4258536, 
A    external: 8224 } 






On Thursday, June 14, 2018 at 2:12:35 AM UTC+4, George (Cloud Platform 
Support) wrote:
>
> What is it meant here by: "This command also run "Appengine" for starting 
> app."? How did you deploy your app? The usual command is gcloud app deploy. 
> You may find more related information in the "Quickstart for Node.js in the 
> App Engine Standard Environment" online document. [1]
>
> What is the structure of your app? One would expect: 
>
> my-nodejs-service/
>   app.yaml
>   package.json
>   server.js
>
> More related information may be read on the "Writing Your Web Service with 
> Node.js". [2]
>
> It seems you run your app locally with parameters that differ by reference 
> to the deployed app. 
>
> What is the output of the "gcloud info" command in your local environment? 
>
> [1] https://cloud.google.com/nodejs/getting-started/hello-world
> [2] 
> https://cloud.google.com/appengine/docs/standard/nodejs/building-app/writing-web-service
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/a1f65d6b-fbf2-4662-a72c-33fa07ba2e51%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • [google-appengine]... mr . efrem
    • [google-appen... mr . efrem
    • [google-appen... 'George (Cloud Platform Support)' via Google App Engine
      • [google-a... mr . efrem
      • [google-a... mr . efrem
        • [goog... 'George (Cloud Platform Support)' via Google App Engine
          • [... mr . efrem
            • ... 'George (Cloud Platform Support)' via Google App Engine
              • ... Aleksander Efremov
                • ... 'George (Cloud Platform Support)' via Google App Engine
                • ... Aleksander Efremov
                • ... 'George (Cloud Platform Support)' via Google App Engine
                • ... Aleksander Efremov
                • ... 'George (Cloud Platform Support)' via Google App Engine

Reply via email to