Skip to content

Relative path for scriptFile #1229

@bondz

Description

@bondz

I'm trying to setup a bot function using typescript, my app is compiled in a build folder which contains an index.js, I've tried to set the path in function.json in the root directory using relative and absolute paths. but the app won't boot unless the file is in the same location as function.json

{
  "disabled": false,
  "scriptFile": "./build/index.js",
  "bindings": [
    {
      "authLevel": "function",
      "type": "httpTrigger",
      "direction": "in",
      "name": "req"
    },
    {
      "type": "http",
      "direction": "out",
      "name": "res"
    }
  ]
}

My folder structure is

|   .gitignore
|   host.json
|   
+---messages
|   |   function.json
|   |   package.json
|   |   test.js
|   |   
|   +---.vscode
|   |       launch.json
|   |       
|   \---build
|           index.js
|           
\---PostDeployScripts
        runGulp.cmd

I've tried build/index.js, D://site.../build/index.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions