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.

Global server at /api

See original GitHub issue

Environment

  • 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:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
danielroecommented, Oct 1, 2022

Let’s follow that request in https://github.com/nuxt/framework/issues/7458.

0reactions
tobiasdiezcommented, Oct 1, 2022

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).

Read more comments on GitHub >

github_iconTop 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 >

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