-
-
Save darkedges/2ec023067cd23e5a028a4afdcff093b0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -X POST http://localhost:8008/helloWorldHttp -H "Content-Type: application/json" -d "{\"name\": \"Test\"}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * HTTP Cloud Function. | |
| * | |
| * @param {Object} req Cloud Function request context. | |
| * @param {Object} res Cloud Function response context. | |
| */ | |
| exports.helloWorldHttp = function helloWorldHttp (req, res) { | |
| res.send('Hello ${req.body.name || 'World'}!'); | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Starting Google Cloud Functions Emulator... | |
| Google Cloud Functions Emulator STARTED | |
| ┌───────────────┬────────────┬────────────────────────────────────────────────────┐ | |
| │ Name │ Type │ Path │ | |
| ├───────────────┴────────────┴────────────────────────────────────────────────────┤ | |
| │ No functions deployed _\_(?)_/_. Run "functions deploy" to deploy a function │ | |
| └─────────────────────────────────────────────────────────────────────────────────┘ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Function helloWorldHttp deployed. | |
| ┌──────────┬──────────────────────────────────────────────────────────────────────┐ | |
| │ Property │ Value │ | |
| ├──────────┼──────────────────────────────────────────────────────────────────────┤ | |
| │ Name │ helloWorldHttp │ | |
| ├──────────┼──────────────────────────────────────────────────────────────────────┤ | |
| │ Type │ HTTP │ | |
| ├──────────┼──────────────────────────────────────────────────────────────────────┤ | |
| │ Path │ C:\development\gcloud\functions │ | |
| ├──────────┼──────────────────────────────────────────────────────────────────────┤ | |
| │ Url │ http://localhost:8008/helloWorldHttp │ | |
| └──────────┴──────────────────────────────────────────────────────────────────────┘ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment