Comments (10)
@Jefiozie I forked the project and modified some behaviours so it can work as expected.
Can I do a Pull Request to integrate?
from azure-func-http.
@daniloraisi PRs are more than welcome!
from azure-func-http.
@Jefiozie have you encountered such an issue before?
from azure-func-http.
hi @kamilmysliwiec, I've not seen this. I think the main reason that I've not seen this is that I've used the introduced --project
flag when switching to the monorepo setup.
@daniloraisi I think you could setup our your project by using the following steps:
- Create a new NestJS project using CLI
nest new my-project
- Create a Monorepo adding new app with
nest g app my-app
- Add azure-http-func to the first app:
nest add @nestjs/azure-func-http --project my-project
- Try add azure-http-func to the second app:
nest add @nestjs/azure-func-http --project my-app
- Navigate to
apps/my-app/src
- run
npx func host start
Let us know if this worked out for you or if this is not working for your use case.
from azure-func-http.
@Jefiozie Thanks for your solution. Locally its work well but what is the proper way to publish function?
I built app by nest built app
and publish by func azure functionapp publish
but App Service doesn't contain any function.
from azure-func-http.
Hi @pawelbart, did you already seen the blog here they use a extension in vscode. I don't know the exact commands for publishing them with the func
cmdline tool. Is this related to this issue or is it a other issue you are experiencing?
from azure-func-http.
@Jefiozie it works, but there are some caveats:
-
Function files are generated per app basis, but nest build will generate everything into
dist
folder. So, as @pawelbart pointed, we have problems publishing them. -
nest-cli.json
is altered withwebpack: true
andwebpackConfig:...
on a project basis, but if I try a default build executing justnest build
it uses NestJS default webpack. -
Script
start:azure
generated on package.json will not work, since all function files are available only on each app directory.
I know that probably this is kind an edge case, but it's interesting to talk about.
from azure-func-http.
@Jefiozie Yes, I read the blog article and everything works for me for standard app (without monorepo structure).
VSCode extension Azure Functions under the hood calls the following sequence:
npm install
, npm run build
, npm prune --production
, func azure functionapp publish <app-name>
For monorepo nest build
generates path dist/apps/api/main.js
. Because function.json
has "scriptFile": "../../../../dist/apps/<app-name>/main/index.js"
I run nest build <app-name>
, which generates such path.
I noticed that during deployment there are uploaded only files from apps/<app-name>/src
(excluding files from .funcignore
) instead of the entire project. That's why dist/apps/<app-name>/main/index.js
does't exist in wwwroot
folder on Azure Storage account.
I'm looking for the best way to send the entire project to Azure. Maybe it is possible to set project root path in function.json
or somewhere else?
I agree with @daniloraisi that this is an interesting topic. Thanks for your help.
from azure-func-http.
Some news @kamilmysliwiec?
from azure-func-http.
Just merged your PR and published as 0.6.0
from azure-func-http.
Related Issues (20)
- AzureHttpRouter constructor throws an exception HOT 3
- enable server side event support HOT 2
- Cronjobs support HOT 1
- Pls update documentation that this project is abandoned / deprecated HOT 1
- Error: Cannot find module '@schematics/angular/utility/dependencies' HOT 1
- Action Required: Fix Renovate Configuration
- TRouter constructor is undefined at runtime in AzureHttpRouter HOT 7
- Dependency Dashboard
- Response Headers are Not Matching the NEST Response when publish to Azure Function HOT 1
- package fails to install HOT 1
- exclude path not working in Azure function HOT 1
- CORS does not work with azure-func-http HOT 1
- class-validator is not working
- Make nest openapi impl better with azurefx HOT 1
- swagger-ui* not loading HOT 1
- Peer dependencies allows @azure/functions v1 or v3 but not v2 HOT 5
- MonoRepo Support HOT 1
- Azure Functions v4 support HOT 4
- Project dependencies
- Could not resolve dependency with @nestjs/common 9.0.0 HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-func-http.