I have exported from github the backend from my application into glitch, but my get requests to https://rpgcharactermanagerbackend.glitch.me/characters times out, is it a port problem or something else?
This is usually due to the fact that you don’t have a valid res.send() function.
I’ll try and switch all my res.json to res.send, expect an answer soon
Tried and failed, any other ideas? I’ll try to connect to the ip of the project and report my findings
EDIT: doing a get request to the project ip didn’t work
Glitch project shares IPs. So that would not work.
This idea indeed went wrong. So I tried compiling all my typescript code into javascript, then creating a project from these files, it didn’t quite work. The server looks like its up but when I go to https://personifier.glitch.me/characters I don’t get a json with an array of characters. Any ideias on what to try next?
After messing around with the default express project, I found out the problem was the port. My server was running a different port than the one provided, so I could not access the api, despite it running fine. So I switched port 3333
to process.env.PORT
and it worked Later I’ll try this solution into the typescript version and share my findings.
Yep, typescript works just fine with ts-node installed and using the provided port. Thanks @chessebuilderman for the help!
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.