How to change default port for nexus-prisma server #1015
Answered
by
beeplin
brainafesoh
asked this question in
General
-
Hi guys, please I would like to change the default port ( |
Beta Was this translation helpful? Give feedback.
Answered by
beeplin
Jun 10, 2020
Replies: 2 comments 3 replies
-
or in your |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
brainafesoh
-
I got that to work like this: import { GraphQLServer } from 'graphql-yoga'
import schema from './schema'
import { createContext } from './context'
new GraphQLServer({
schema,
context: createContext,
}).start({ port: process.env.SERVER_PORT }, () =>
console.log(
`🚀 Server ready at: http://localhost:${process.env.SERVER_PORT}`,
),
) You can replace |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PORT=5000 nexus dev
or in your
app.ts
usesettings.change
to apply a new port.