Skip to content

Added azure-node-http example 🎉 #98

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Feb 25, 2017

Conversation

christopheranderson
Copy link

Adds 1 example for Azure node http

Confirmed I ran eslint

Copy link
Contributor

@christophgysin christophgysin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, don't forget to update the README by running npm run docs.

"author": "serverless.com",
"license": "MIT",
"dependencies": {
"serverless-azure-functions": "git+https://github.com/serverless/serverless-azure-functions.git#dev"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pointing to the development branch is fragile, and will very likely break in the future. Maybe we should wait for a first release?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fragile - I'm open to holding the PR until we get that done. I've got that work tracked here: serverless/serverless-azure-functions#13 & serverless/serverless-azure-functions#14

{
"name": "azure-node-simple-http-endpoint",
"version": "0.1.0",
"description": "",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a description?

# Simple HTTP example

In this sample, we deploy an HTTP Node.js Azure Function. This sample show you how to read properties off of a query string or the request body, then set a result back to Azure.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small typo: ... This sample shows you ...

Also maybe 'example' instead of 'sample'?


In this sample, we deploy an HTTP Node.js Azure Function. This sample show you how to read properties off of a query string or the request body, then set a result back to Azure.

## Deploying
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this is considered obvious, but most examples I checked had a 'Setup' section mentioning to run npm install to install the needed plugin.


## Deploying

To deploy, set up your [Credentials](TODO) and run
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the link does not point anywhere useful, I would remove the formatting.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to go to a doc in the docs that isn't live yet. I think I can guess the link properly. We can hold the PR for the link to go live, as well.

@christopheranderson
Copy link
Author

I believe this is now ready to ship :shipit:

@@ -0,0 +1,27 @@
# Simple HTTP example

In this example, we deploy an HTTP Node.js Azure Function. This sample show you how to read properties off of a query string or the request body, then set a result back to Azure.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: "This sample shows ..., then sets ..."


## Setup

1. We recommend Node.js v6.5.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is given by Azure, not really something the user can choose.

## Setup

1. We recommend Node.js v6.5.0
2. Install the serverless framework - `npm i -g serverless`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be assumed to be installed.

@@ -0,0 +1,3 @@
node_modules
functions
.serverless
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider configuring your editor to add a newline at the end of the file.

x-azure-settings:
authLevel : anonymous


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider configuring your editor to add a newline at the end of the file (or simply remove the trailing spaces after the last newline).

@christopheranderson
Copy link
Author

christopheranderson commented Feb 22, 2017

I'll incorporate this feedback and update the PR this afternoon. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants