I am writing services with Serverless Framework & Azure Functions
. Examples out there are very simple. But when I try to take a step further, I run into problem. Currently learning from AWS Lambda
and then trying to implement it on Azure Functions
.
The goal of doing so is:
1) Implement functions as es6
classes and then building the project with webpack.
2) Find a right project structure, which makes more sense.
3) Follow SoC pattern.
I have created a github
project https://github.com/GeekOnGadgets/serverless-azure-settings and when I try to build this project serverless package
it creates .serverless
folder and inside it there is .zip
file (the compiled version). Which I understand gets deployed to azure when you run serverless deploy
. But when I check on Azure the function is just development code and not the compiled one (please refer to the code below).
Can someone please help with this. Any suggestions is appreciated.
import Settings from './src/Settings/Settings'
module.exports.settings = (event, context, callback) => {
let settings = new Settings();
const response = {
statusCode: 200,
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(settings.dev()),
};
callback(null, response);
}