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

Add possibility to change the default "/api" directory #770

Closed
1 task done
enkot opened this issue Dec 20, 2022 · 2 comments · Fixed by #1763
Closed
1 task done

Add possibility to change the default "/api" directory #770

enkot opened this issue Dec 20, 2022 · 2 comments · Fixed by #1763
Labels

Comments

@enkot
Copy link

enkot commented Dec 20, 2022

Describe the feature

There are scenarios when /api route handled by another server/proxy. To make it possible still send request to local Nuxt server without additional /server/routes/front-api directory, we can have defaultApiDir option in Nitro config.

Additional information

  • Would you be willing to help implement this feature?
@enkot enkot changed the title Add possibility to change the default "/api" derectory Add possibility to change the default "/api" directory Dec 20, 2022
@pi0
Copy link
Member

pi0 commented Dec 20, 2022

Hi @enkot. PR is welcome to introduce apiDir (filesystem) and apiRoutePrefix (route prefix /api) options 👍🏼 BTW in meantime, you can simply make a symlink using ln -s server/api server/routes/front-api to alias.

@enkot
Copy link
Author

enkot commented Dec 20, 2022

Hi @pi0. Great, thanks for the almost instant feedback! Will be happy to add it 👍🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants