-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Added azure-node-http example 🎉 #98
Conversation
There was a problem hiding this 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" |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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": "", |
There was a problem hiding this comment.
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. | ||
|
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
I believe this is now ready to ship |
@@ -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. |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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` |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 | ||
|
||
|
There was a problem hiding this comment.
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).
I'll incorporate this feedback and update the PR this afternoon. 👍 |
Adds 1 example for Azure node http
Confirmed I ran eslint