Re: [google-appengine] Re: Run Node app locally and serve static file handlers from app.yaml?

2018-07-12 Thread Ryan B
thanks, steren! makes sense.

i'm actually trying the Node runtime for the first time, on a small 
personal project, so i don't actually have the "lots of static file 
handlers in Node" use case yet. i'm just sensitive to DRY and seeing 
duplicated things skew over time.

thanks again!

On Thursday, July 12, 2018 at 1:39:26 PM UTC-7, Steren Giannini wrote:
>
> Hi Ryan,
>
> The feedback we receive was that Node.js developers expect to start their 
> application with "npm start" more than with "dev_appserver.py".
>
> Replicating the handlers in your web framework is indeed the 
> recommendation that we give in our static handler documentation 
> 
> .
>
> That being said, we are currently exploring an optional solution to run 
> your Node.js App Engine app in a local emulator that would emulate the 
> static handlers.
>
> In am curious, can you share more about why your application uses many 
> different static handlers?
>
> Steren
>
> On Thu, Jul 12, 2018 at 10:28 AM Ryan B > 
> wrote:
>
>> thanks, kenworth!
>>
>> looks like the key part of that example is these lines in app.js:
>>
>> // Use the built-in express middleware for serving static files from 
>> './public'
>> app.use('/static', express.static('public'));
>>
>> that does indeed get the static files serving. it still ignores the 
>> static file handlers in app.yaml, though, and just duplicates them via 
>> express in app.js instead. that's ok, but it's unfortunate for larger 
>> applications with many different static file handlers in app.yaml, since 
>> you have to duplicate them all, and they'll inevitably skew when you change 
>> them.
>>
>> if this is expected, i'm happy to file a feature request on the issue 
>> tracker! just let me know.
>>
>> On Thursday, July 12, 2018 at 9:20:30 AM UTC-7, Kenworth (Google Cloud 
>> Platform) wrote:
>>>
>>> This is currently possible. Here is an example to help you get started:
>>>
>>> https://github.com/
>>> GoogleCloudPlatform/nodejs-docs-samples/tree/master/appengine/static-files
>>>
>>> npm start app.standard.yaml
>>>
>>>
>>>
>>> -- 
>> 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-appengi...@googlegroups.com .
>> To post to this group, send email to google-a...@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/60e8d17a-61b1-4bf7-aced-f669092fcbf6%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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/ba590bf6-8a1e-4468-a262-129244fefe44%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] Re: Run Node app locally and serve static file handlers from app.yaml?

2018-07-12 Thread 'Steren Giannini' via Google App Engine
Hi Ryan,

The feedback we receive was that Node.js developers expect to start their
application with "npm start" more than with "dev_appserver.py".

Replicating the handlers in your web framework is indeed the recommendation
that we give in our static handler documentation

.

That being said, we are currently exploring an optional solution to run
your Node.js App Engine app in a local emulator that would emulate the
static handlers.

In am curious, can you share more about why your application uses many
different static handlers?

Steren

On Thu, Jul 12, 2018 at 10:28 AM Ryan B  wrote:

> thanks, kenworth!
>
> looks like the key part of that example is these lines in app.js:
>
> // Use the built-in express middleware for serving static files from
> './public'
> app.use('/static', express.static('public'));
>
> that does indeed get the static files serving. it still ignores the static
> file handlers in app.yaml, though, and just duplicates them via express in
> app.js instead. that's ok, but it's unfortunate for larger applications
> with many different static file handlers in app.yaml, since you have to
> duplicate them all, and they'll inevitably skew when you change them.
>
> if this is expected, i'm happy to file a feature request on the issue
> tracker! just let me know.
>
> On Thursday, July 12, 2018 at 9:20:30 AM UTC-7, Kenworth (Google Cloud
> Platform) wrote:
>>
>> This is currently possible. Here is an example to help you get started:
>>
>> https://github.com/
>> GoogleCloudPlatform/nodejs-docs-samples/tree/master/appengine/static-files
>>
>> npm start app.standard.yaml
>>
>>
>>
>> --
> 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/60e8d17a-61b1-4bf7-aced-f669092fcbf6%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CANHKq5GKXzqjU%3DxwxVGExA8ws3vbP5sCdFD9duoZ5jdKzVfe%2Bw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Run Node app locally and serve static file handlers from app.yaml?

2018-07-12 Thread Ryan B
thanks, kenworth!

looks like the key part of that example is these lines in app.js:

// Use the built-in express middleware for serving static files from 
'./public'
app.use('/static', express.static('public'));

that does indeed get the static files serving. it still ignores the static 
file handlers in app.yaml, though, and just duplicates them via express in 
app.js instead. that's ok, but it's unfortunate for larger applications 
with many different static file handlers in app.yaml, since you have to 
duplicate them all, and they'll inevitably skew when you change them.

if this is expected, i'm happy to file a feature request on the issue 
tracker! just let me know.

On Thursday, July 12, 2018 at 9:20:30 AM UTC-7, Kenworth (Google Cloud 
Platform) wrote:
>
> This is currently possible. Here is an example to help you get started:
>
>
> https://github.com/GoogleCloudPlatform/nodejs-docs-samples/tree/master/appengine/static-files
>
> npm start app.standard.yaml
>
>
>
>

-- 
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/60e8d17a-61b1-4bf7-aced-f669092fcbf6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Run Node app locally and serve static file handlers from app.yaml?

2018-07-12 Thread 'Kenworth (Google Cloud Platform)' via Google App Engine
This is currently possible. See example 

.

-- 
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/9bf7bdd7-aaae-4bfb-abdd-c537b315da31%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.