GithubHelp home page GithubHelp logo

Comments (7)

kamilmysliwiec avatar kamilmysliwiec commented on April 25, 2024

Can you take a look (please :))? @Jefiozie

from azure-func-http.

Jefiozie avatar Jefiozie commented on April 25, 2024

Sure, I will try and do my best to check it in upcoming days.

from azure-func-http.

drieshooghe avatar drieshooghe commented on April 25, 2024

@Jefiozie the actions that fixed it for me in monorepo/webpack mode:

  1. Overriding the webpack configuration with the following:
module.exports = function (options) {
	return {
		...options,
		entry: __dirname + '/main/index.ts',
		output: {
			libraryTarget: 'commonjs2',
			filename: 'main/index.js'
		},
	};
};
  1. In the main.azure.ts file, adding the AzureHttpRouter to the create method:
const app = await NestFactory.create(AppModule, new AzureHttpRouter());

from azure-func-http.

Jefiozie avatar Jefiozie commented on April 25, 2024

Thank you for your research, I hope I can find the time somewhere in the upcoming 2 days to resolve it.

from azure-func-http.

Jefiozie avatar Jefiozie commented on April 25, 2024

Hi @drieshooghe,

Could you tell me how you generated the project/ nest workspace? I would like to create an identical setup to test some stuff locally.

Thanks!

from azure-func-http.

Jefiozie avatar Jefiozie commented on April 25, 2024

Hi @drieshooghe,

I did some test and have some findings, I think we have a different setup so this will not completely be the same on your side as I believe. However, maybe it will help you for now as I think we need to change the schematics a bit (but I don't know how yet to what 😉)

  1. I generated a new nest project with nest new projectA
  2. I created a monorepo by running nest generate app projectA
  3. I've added the nestjs/azue-func-http by running nest add @nestjs/azure-func-http --project projectA
  4. Now all the specific azure files will be placed at your project folder
  5. In the nest-cli.json I've changed the compilerOptions-> webpack setting from true to false
  6. In the function.json file I made the adjustment to the scriptFile to be something like "../../../../dist/apps/<YOUR APP>/main/index.js"
  7. I run nest build projectA
  8. In the terminal I navigate to the folder where the project is so something like cd apps/<YOUR PROJECT>/src
  9. When I run npx func host start it should work.

I can see that this is not the behavior you are looking for but I need some more time digging into this issue and find a correct strategy to resolve it. I like the webpack part but I need to see where it fits with all other aspects of the structure.

from azure-func-http.

kamilmysliwiec avatar kamilmysliwiec commented on April 25, 2024

This should be fixed now. Let me know if you face any further issues

from azure-func-http.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.