How do I check if it goes "@sapphire/plugin-api"

How do I check if @sapphire/plugin-api bot api is working properly, I use railway for production
Solution:
add a route and see if you can query it. How that integrates with railway is for you to figure out, support for sapphire does not extend to the hosting platform.
Jump to solution
18 Replies
Solution
Favna
Favna8mo ago
add a route and see if you can query it. How that integrates with railway is for you to figure out, support for sapphire does not extend to the hosting platform.
UndiedGFX
UndiedGFX8mo ago
the api should be exposed on the port you specified, use whatever url the origin you set it if railway doesnt give you a url use ngrok to expose it from localhost
Favna
Favna8mo ago
or port 4000 by default
UndiedGFX
UndiedGFX8mo ago
i had to check the docs if you could set the api origin before i sent it
Favna
Favna8mo ago
https://try.cloudflare.com better use cloudflare, more reliable than ngrok
UndiedGFX
UndiedGFX8mo ago
or that
RedStar
RedStarOP8mo ago
With railway I can generate the site or use tcp
UndiedGFX
UndiedGFX8mo ago
so you have to edit the origin in your api options to the url railway generates or else use ngrok/cloudflare to map railway's local host to a public url
Favna
Favna8mo ago
(both ngrok and try.cloudflare are temporary solutions btw, you should eventually get a domain and use that)
UndiedGFX
UndiedGFX8mo ago
^^
RedStar
RedStarOP8mo ago
i already have it lol
UndiedGFX
UndiedGFX8mo ago
if you have a url ready, just set the origin in api plugin options
Favna
Favna8mo ago
And configure railway ingress I guess. No idea how railway does firewalling / reverse proxying / ingress
RedStar
RedStarOP8mo ago
railway and a docker-based hosting, supports the creation of domains generated as vercel I tested, local goes but I don't know if in production goes In the end it's like you're using a website? right? Do I try cloudflare tunnel?
UndiedGFX
UndiedGFX8mo ago
correct
RedStar
RedStarOP8mo ago
Now goes the api but I don't know if there is a way to merge the two sites Do I try Caddy?

Did you find this page helpful?