Global server at /api
See original GitHub issueEnvironment
- Operating System:
Linux
- Node Version:
v16.13.0
- Nuxt Version:
3.0.0-rc.1
- Package Manager:
yarn@1.22.17
- Builder:
vite
- User Config:
target
,bridge
,vite
,alias
,nitro
,ssr
,meta
,css
,tailwindcss
,modules
,watch
,runtimeConfig
,build
,storybook
- Runtime Modules:
@nuxtjs/tailwindcss@5.0.2
,@pinia/nuxt@0.1.8
- Build Modules:
-
Reproduction
https://github.com/JabRef/JabRefOnline/pull/1009
Describe the bug
Not sure if this is a bug report or a feature request.
For graphql servers, it’s quite common to only expose a single server route. However, I was not able to expose the server at /api
. I tried adding a /server/api/index.ts
file, but then the server would be available at /api/index
. With /server/api/[...].ts
one has to use /api/
with slash.
Additional context
No response
Logs
No response
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Server Global API - ServiceNow Developers
API Reference - Server Global. ServiceNow provides JavaScript APIs for use within scripts running on the ServiceNow platform to deliver common functionality ...
Read more >Server API (SAPI) | Bloomberg Professional Services
Bloomberg Server API (SAPI) delivers a powerful complement to the Bloomberg Terminal. SAPI allows you to consume Bloomberg's unique real-time market, ...
Read more >API Server and Base Path - Swagger
The global servers array can be overridden on the path level or operation level. This is handy if some endpoints use a different...
Read more >What is global server load balancing (GSLB)? - Cloudflare
Global server load balancing or GSLB is the practice of distributing Internet traffic amongst a large number of connected servers dispersed around the...
Read more >Global Traffic Management API - Akamai TechDocs
Global Traffic Management (GTM) is a dynamic DNS system that manages traffic to your data centers. From one moment to the next, GTM...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Let’s follow that request in https://github.com/nuxt/framework/issues/7458.
Thanks for the update. I can confirm that with a file at
~/server/api/index.ts
the/api
route works as expected. However, the route with a slash,/api/
shows now the main index page (in the above stackbliz you linked to) or a 404 error (in my repo).