Command functions:serve - Can’t setup custom path for functions
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 474
- Avg merge
- 23h 30m
- Merged PRs (30d)
- 53
Description
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
- Clone this repository: https://github.com/TulioPintoNeto/financial-control;
- Run the command
npm run functionsornetlify functions:serve; - Hitting
http://localhost:9999/api/helloreturn 404 (Functions not found...); - Alternatively, you can also use
netlify functions:listto check the URLs and see thatConfigis 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with netlify functions:serve and the provided [functions] directory configuration, then compare the behavior with netlify functions:list. Trace how these commands handle the configured function path and custom routes. Done means /api/hello resolves locally and the list command reports the configured URLs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100