GithubHelp home page GithubHelp logo

Comments (5)

MicroFish91 avatar MicroFish91 commented on June 12, 2024

How did you create this project? What kind of trigger did you start with? When you create a new TS project with an httpTrigger, it looks like this:

Image

from vscode-azurestaticwebapps.

diberry avatar diberry commented on June 12, 2024

I started with VSCode's Azure functions extension to create function app but selected the Node.js v4 model. The trigger was an HTTP trigger but I renamed it in the step to status.

Thanks for providing the code - I do know what the code looks like - just wondered if the Azure Functions vscode extension was supposed to work with the new programming model.

from vscode-azurestaticwebapps.

diberry avatar diberry commented on June 12, 2024

I can't repro this now.

from vscode-azurestaticwebapps.

diberry avatar diberry commented on June 12, 2024

Just repro'd: more details.

  1. On windows - internal FTE laptop windows version.
  2. In new/empty folder - nothing else in it - not even .git.
  3. Created new app from Azure explorer workspace icon - didn't ask me for directory - all questions asked and answered - no problems. (I tried a second time using the Command Pallete and was allowed to select the base directory - the final file created looks correct and there is no API nesting)

image

  1. After process, file is named correctly but only has
{
    "name": "Azure"
}
  1. Another weird thing is that the directory structure is an additional layer of api.

image

image

from vscode-azurestaticwebapps.

nturinski avatar nturinski commented on June 12, 2024

Ah, I see. This is a good find!

The "+" button that you're clicking is actually part of the Static Web Apps extension (that leverages Functions to create a HTTP Trigger). SWA must not be equipped to deal with the new programming model which is probably why it's creating this weird function. That's also why it's automatically creating it in the "api" folder.

If you want to create a new Functions project using the Functions extension, you need to click the image button instead. But this is definitely something that we need to fix (though I'm going to transfer it to SWA since it's technically an issue there)

from vscode-azurestaticwebapps.

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.