Navigation Menu

Skip to content
This repository has been archived by the owner on May 15, 2019. It is now read-only.

Path differs on Google Cloud vs Emulator #26

Closed
Tivoli opened this issue Jan 8, 2017 · 2 comments
Closed

Path differs on Google Cloud vs Emulator #26

Tivoli opened this issue Jan 8, 2017 · 2 comments
Labels
Projects
Milestone

Comments

@Tivoli
Copy link

Tivoli commented Jan 8, 2017

Description

The req.path is one level up on the emulator vs a function deployed on GCF.

Steps to reproduce

exports.test = function test(req, res) {
  const url = req.path;
  res.json({url});
}

The url will be '/test' when using the emulator and on GCF the url will be '/'.

Thanks!

@jmdobry
Copy link
Contributor

jmdobry commented Jan 30, 2017

This is fixed in the unreleased 1.0.0-alpha.1 version on the master branch.

@jmdobry jmdobry self-assigned this Jan 30, 2017
@jmdobry jmdobry added the bug label Jan 30, 2017
@jmdobry jmdobry added this to the 1.0.0-alpha.1 milestone Jan 30, 2017
@jmdobry jmdobry added this to In Progress in Emulator Jan 30, 2017
@jmdobry
Copy link
Contributor

jmdobry commented Feb 1, 2017

1.0.0-alpha.1 has been released to NPM, install it with:

npm install -g @google-cloud/functions-emulator@1.0.0-alpha.1

or

yarn global add @google-cloud/functions-emulator@1.0.0-alpha.1

@jmdobry jmdobry closed this as completed Feb 1, 2017
@jmdobry jmdobry moved this from In Progress to Done in Emulator Feb 1, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
Development

No branches or pull requests

2 participants