Hey guys! I am trying to host my Prisma API on my ...
# prisma-whats-new
m
Hey guys! I am trying to host my Prisma API on my WIFI network so that my react native app can access it when using the app via my physical phone. When I try to login I get a response in my terminal, but I also get this:
Copy code
[Network error]: FetchError: request to <http://localhost:4466/Ecommerce-server/dev> failed, reason: connect ECONNREFUSED 127.0.0.1:4466
Error: request to <http://localhost:4466/Ecommerce-server/dev> failed, reason: connect ECONNREFUSED 127.0.0.1:4466
    at Object.checkResultAndHandleErrors (/Users/martinnord/Apps/Ecommerce-server/node_modules/graphql-tools/src/stitching/errors.ts:97:11)
h
How you init your client?
you need ip and port of your computer not localhost
m
yea! In my apollo client I have this:
link: authLink.concat(createUploadLink({ uri: '<http://192.168.41.147:4000>' }))
This is the output when I try to register a user:
Copy code
Request to <http://localhost:4466/Ecommerce-server/dev>:
query:
mutation ($_data: UserCreateInput!) {
  createUser(data: $_data) {
    id
    email
    password
    name
  }
}
operationName: null
variables:
{
  "_data": {
    "email": "guts",
    "password": "$2a$10$zsIjBkrJxGT6BQbCkbA2KOQq.2p/yoLlPVjEm/SpOc1ZlGkS89iuS",
    "name": "hello"
  }
}
[Network error]: FetchError: request to <http://localhost:4466/Ecommerce-server/dev> failed, reason: connect ECONNREFUSED 127.0.0.1:4466
Error: request to <http://localhost:4466/Ecommerce-server/dev> failed, reason: connect ECONNREFUSED 127.0.0.1:4466
    at Object.checkResultAndHandleErrors (/Users/martinnord/Apps/Ecommerce-server/node_modules/graphql-tools/src/stitching/errors.ts:97:11)
Sorry for the big text
h
Is your prisma service running? Looks like you can't connect to that
m
trying to restart it
nopp. still this weird shit
h
if you access it on http://localhost:4466/Ecommerce-server/dev can you run queries?
m
getting
This site can't be reached
😞
h
yea, i think your prisma instance is not running somehow
m
arghhhhhh
Docker wasnt running!!!
thanks