Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Michaël De Boey <info@michaeldeboey.be>
Co-authored-by: Christian Köberl <derkoe@users.noreply.github.com>
  • Loading branch information
3 people committed Aug 20, 2022
1 parent a2ffdf0 commit 8e94a44
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/remix-azure-functions/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function createRequestHandler({

return async (_context: Context, req: HttpRequest) => {
let request = createRemixRequest(req);
let loadContext = getLoadContext ? getLoadContext(req) : undefined;
let loadContext = getLoadContext?.(req);

let response = (await handleRequest(
request as unknown as Request,
Expand Down
2 changes: 1 addition & 1 deletion templates/azure-functions/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
14
5 changes: 2 additions & 3 deletions templates/azure-functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@
"scripts": {
"build": "remix build",
"dev": "swa start ./public --run \"remix dev\" --api-location .",
"postinstall": "func init --worker-runtime node --language typescript && remix setup azure-functions"
"postinstall": "func init --worker-runtime node --language typescript"
},
"dependencies": {
"@remix-run/azure-functions": "*",
"@remix-run/react": "*",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"remix": "*"
"react-dom": "^17.0.2"
},
"devDependencies": {
"@azure/functions": "^3.0.0",
Expand Down
8 changes: 5 additions & 3 deletions templates/azure-functions/public/staticwebapp.config.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"routes": [
{
"route": "/",
"rewrite": "/api/azure"
"route": "/build/*"
},
{
"route": "/favicon.ico"
},
{
"route": "/index.html",
"route": "/*",
"rewrite": "/api/azure"
}
],
Expand Down

0 comments on commit 8e94a44

Please sign in to comment.