-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
37 lines (28 loc) · 1 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
.PHONY: ent graphql proto relay flow view connect-db enter-db
# generate Go interfaces to interact with data models from Ent schema
ent:
go generate ./...
# autogenerate (possibly stubbed) resolvers for Ents and oher models in graphQL schema
graphql:
go run github.com/99designs/gqlgen generate
proto:
protoc -I proto/ --go_out . proto/*.proto --go-grpc_out .
# compile graphQL fragments in frontend and generate Flow typings
relay:
cd frontend && yarn relay
# verify all Flow typings
flow:
cd frontend && yarn flow
# serve backend (run `yarn start` for frontend)
view: export SESSION_KEY = abcdef
view: export ENV = dev
view: export GRADESCOPE_TOKEN = abcdef
view: export SCOREBOARD_TOKEN = abcdef
view: export GRPC_PORT = 12345
view: export CLOUDFLARE_ZONE = abcd
view:
go run ./cmd/site
connect-db:
./cloud_sql_proxy -enable_iam_login -instances=formidable-gate-337712:us-west2:cs170-db=tcp:5432
enter-db:
psql --host=localhost --port=5432 [email protected] --dbname=autograder