Skip to content

Commit f60eeb6

Browse files
Merge pull request #269 from daniloraisi/monorepo-fix
Monorepo fix
2 parents f05df96 + 0c72df9 commit f60eeb6

File tree

12 files changed

+53
-49
lines changed

12 files changed

+53
-49
lines changed
File renamed without changes.

schematics/install/files/project/__sourceRoot__/main/function.json renamed to schematics/install/files/project/__project__/function.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
"type": "httpTrigger",
66
"direction": "in",
77
"name": "req",
8-
"route": "{*segments}"
8+
"route": "<%= getProjectName() %>/{*segments}"
99
},
1010
{
1111
"type": "http",
1212
"direction": "out",
1313
"name": "res"
1414
}
1515
],
16-
"scriptFile": "../../../../dist/<%= getRootDirectory() %>/main/index.js"
16+
"scriptFile": "../dist/<%= getProjectName() %>/index.js"
1717
}

schematics/install/files/project/__sourceRoot__/main/index.ts renamed to schematics/install/files/project/__project__/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Context, HttpRequest } from '@azure/functions';
22
import { AzureHttpAdapter } from '@nestjs/azure-func-http';
3-
import { createApp } from '../main.azure';
3+
import { createApp } from '../apps/<%= getProjectName() %>/src/main.azure';
44

55
export default function(context: Context, req: HttpRequest): void {
66
AzureHttpAdapter.handle(createApp, context, req);
File renamed without changes.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = function (options) {
2+
return {
3+
...options,
4+
entry: __dirname + '/index.ts',
5+
output: {
6+
libraryTarget: 'commonjs2',
7+
filename: '<%= getProjectName() %>/index.js'
8+
}
9+
};
10+
};

schematics/install/files/project/__rootDir__/webpack.config.js

Lines changed: 0 additions & 10 deletions
This file was deleted.

schematics/install/files/project/__sourceRoot__/main.azure.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { <%= getRootModuleName() %> } from './<%= getRootModulePath() %>';
44

55
export async function createApp(): Promise<INestApplication> {
66
const app = await NestFactory.create(<%= getRootModuleName() %>);
7-
app.setGlobalPrefix('api');
8-
7+
app.setGlobalPrefix('api/<%= getProjectName() %>');
8+
99
await app.init();
1010
return app;
1111
}
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)