question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Document --prefix and --script-root as cli options that are available to use from func start

See original GitHub issue

Background

We are currently working on a TypeScript project where our code is laid out as following:

src/
  FunctionOne/
  - function.json
  - index.ts
  FunctionTwo/ 
   - function.json
   - index.ts
 - host.json
 - shared/*
 - ...

And the corresponding output from the tsc compiler:

src/
  FunctionOne/
  - function.json
  - index.js
  FunctionTwo/ 
   - function.json
   - index.js
 - host.json
 - shared/*
 - ...

However to get this approach working we had to navigate trough several issues and comments on this topic. And to make our code work locally we had to prefix the func start with --prefix dist or otherwise we could also use --script-root dist, but it seems that using --prefix is the best option. These options have been available for a while but they are not documented and neither available from the CLI options for the func start command.

Proposal

If these options are meant to be used it would be nice to have them documented or at least available from the CLI. I am open for making a contribution / PR, but would like your input on the topic first…

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
cristobalcommented, Mar 21, 2022

@cristobal Thanks for pointing this out! Yes, if you could add the documentation for both --prefix and --script-root in a PR, that would be fantastic.

Aight will look into it this week, sorry did not see this reply before now. Been a bit busy at work and drown in Github messages at work need to sort out the notifications here somehow 😂

0reactions
cristobalcommented, Jul 12, 2022

@andriimazur93 sorry been quite busy at work lately, i have some time off now. But will look into it and fix it next week. thanks for reminding me of this 👌👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure Functions Core Tools reference
This article provides reference documentation for the Azure Functions Core Tools, which lets you develop, manage, and deploy Azure Functions ...
Read more >
Work with Azure Functions Core Tools
Learn how to code and test Azure Functions from the command prompt or terminal on your local computer before you run them on...
Read more >
PowerShell Scripting – Get started with this Ultimate Guide
Learn how to make your own PowerShell Scripts with this complete guide. Learn the basics of PowerShell and how to create your own...
Read more >
Run Azure Functions V3 (.NET 5) on a different port locally
NET 5, it doesn't work. I get the following message when I try to run it. Could not execute because the specified command...
Read more >
How to run Azure Function app on a different port in Visual ...
Running Azure Fucntion CLI ( func host start ) from bin directory correctly read the port number. Looks like VS is not using...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found