40 lines
1.0 KiB
JSON
40 lines
1.0 KiB
JSON
{
|
|
"name": "api",
|
|
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
"root": "apps/api",
|
|
"sourceRoot": "apps/api",
|
|
"projectType": "application",
|
|
"targets": {
|
|
"dev": {
|
|
"executor": "nx:run-commands",
|
|
"options": {
|
|
"cwd": "apps/api",
|
|
"command": "GO_WATCH_PRESTART='go run ./cmd/migrate' node ../../scripts/go-watch.mjs -- go run ./cmd/gateway"
|
|
}
|
|
},
|
|
"migrate": {
|
|
"executor": "nx:run-commands",
|
|
"options": {
|
|
"cwd": "apps/api",
|
|
"command": "go run ./cmd/migrate"
|
|
}
|
|
},
|
|
"test": {
|
|
"executor": "nx:run-commands",
|
|
"outputs": ["{workspaceRoot}/coverage/apps/api"],
|
|
"options": {
|
|
"cwd": "apps/api",
|
|
"command": "go test ./..."
|
|
}
|
|
},
|
|
"build": {
|
|
"executor": "nx:run-commands",
|
|
"outputs": ["{workspaceRoot}/dist/apps/api"],
|
|
"options": {
|
|
"cwd": "apps/api",
|
|
"command": "go build -o ../../dist/apps/api/easyai-ai-gateway ./cmd/gateway"
|
|
}
|
|
}
|
|
}
|
|
}
|