Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command functions:serve - Can’t setup custom path for functions #6518

Open
TulioPintoNeto opened this issue Apr 21, 2024 · 2 comments
Open
Labels
type: bug code to address defects in shipped code

Comments

@TulioPintoNeto
Copy link

Describe the bug

According to the documentation for route requests, it should be possible to set up custom route paths for my functions, so I can change the default paths as my needs.

Currently, the Config doesn't work at all, meaning that is like this option is not existent at all.

Steps to reproduce

  1. Clone this repository: https://github.com/TulioPintoNeto/financial-control;
  2. Run the command npm run functions or netlify functions:serve;
  3. Hitting http://localhost:9999/api/hello return 404 (Functions not found...);
  4. Alternatively, you can also use netlify functions:list to check the URLs and see that Config is not doing nothing at all.

Configuration

[functions]
directory = "src/api/routes"

Environment

System:

OS: Windows 10 10.0.19045
CPU: (4) x64 Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz
Memory: 1.04 GB / 7.87 GB

Binaries:

Node: 18.18.2 - C:\Program Files\nodejs\node.EXE     
npm: 10.2.3 - C:\Program Files\nodejs\npm.CMD     
@TulioPintoNeto TulioPintoNeto added the type: bug code to address defects in shipped code label Apr 21, 2024
@TulioPintoNeto
Copy link
Author

Related: This discussion also happened in Netlify forums https://answers.netlify.com/t/cant-setup-custom-path-for-functions/116319/2 but it was recommended to me to open an issue in CLI GitHub

@hrishikesh-k
Copy link

For further context on whoever sees this, based on this line:

// This is needed for the functions:serve command, where the dev server that normally does the matching doesn't run.
this is probably expected. Though this would be a good improvement to have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug code to address defects in shipped code
Projects
None yet
Development

No branches or pull requests

2 participants