Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-capstone-design1
/
Triz_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
sdy
2020-04-19 16:11:45 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a45d02c100f5350d321c777509f7266cb01e65f8
a45d02c1
1 parent
d9f9801b
update server.js
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletions
back/src/server.js
back/src/server.js
View file @
a45d02c
...
...
@@ -3,10 +3,19 @@ dotenv.config();
import
{
GraphQLServer
}
from
"graphql-yoga"
;
import
morgan
from
"morgan"
;
import
schema
from
"./schema"
;
import
{
prisma
}
from
"./utils"
;
const
PORT
=
process
.
env
.
PORT
;
const
server
=
new
GraphQLServer
({
schema
});
const
server
=
new
GraphQLServer
({
schema
,
context
:
(
request
)
=>
{
return
{
...
request
,
prisma
,
};
},
});
server
.
express
.
use
(
morgan
(
"dev"
));
...
...
Please
register
or
login
to post a comment