-
Notifications
You must be signed in to change notification settings - Fork 164
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
Support for Google Cloud Functions / Azure Functions #6
Comments
Interesting - I am up for it! I also know that the Serverless people are looking at making a generic function handler type interface: (I think the discussion is here: serverless/fdk#14) So I was thinking I might eventually move to 'that' interface -- thoughts? |
how soon will you add support for GCF? |
Google Cloud functions look almost like they have their own version of this module anyway "internally" because they give you a req and res object in their handler. Have you tried just app = koa() Without any library help? |
yup, it's working. |
I'm always up for PRs that can help with any issues around GCF or Azure |
Do you have an idea/quick fix to make my function working on Azure? const express = require('express')
const sls = require('serverless-http')
const app = express()
app.get('/', function (req, res) {
res.send('Hello World!')
})
module.exports.server = sls(app) |
I have never looked in to Azure. What does a basic "200 ok" look like in
pure azure?
…On Wed, Oct 17, 2018, 7:13 PM Emilien Devos ***@***.***> wrote:
Do you have an idea/quick fix to make my function working under Azure?
Here is my code:
const express = require('express')
const sls = require('serverless-http')
const app = express()
app.get('/', function (req, res) {
res.send('Hello World!')
})
module.exports.server = sls(app)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAjzFDPaXHZXJJADUpceMS0TYNJHjvHpks5ul7mjgaJpZM4LP9WC>
.
|
Here is an example of serverless for Azure: https://github.com/serverless/serverless/blob/master/lib/plugins/create/templates/azure-nodejs/handler.js And if you need a pure example, here is this code took from the official documentation: module.exports = async function (context, req) {
context.log('JavaScript HTTP trigger function processed a request.');
// You can call and await an async method here
return {
body: "Hello, world!"
};
} Link of the documentation: https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference-node |
I refactored this library to support multiple providers, however I don't have any plans to implement them. PRs are welcome. |
Where can we find this refactored version? Would there be a branch for this? |
I think it would be great as by supporting all providers this project has the potential to become the one serverless framework to rule them all. I don't know if this would fit the current scope of the project though.
Otherwise I am thinking maybe of making another project using this one as its "lambda" adapter.
The text was updated successfully, but these errors were encountered: