Skip to content

Commit

Permalink
Merge pull request #839 from wellcomecollection/rk/update-ports-for-d…
Browse files Browse the repository at this point in the history
…ev-nginx

Update ports and config to use local nginx for dev
  • Loading branch information
kenoir authored Feb 3, 2025
2 parents 57ac014 + e81d440 commit ac6dffa
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ case class ApiConfig(
) {
// Used to determine whether we're running in a dev environment
def environment: ApiEnvironment = publicHost match {
case "localhost" => ApiEnvironment.Dev
case _ if publicHost.contains("stage") => ApiEnvironment.Stage
case _ => ApiEnvironment.Prod
case _ if publicHost.contains("api-dev") => ApiEnvironment.Dev
case _ if publicHost.contains("api-stage") => ApiEnvironment.Stage
case _ => ApiEnvironment.Prod
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class ApiConfigTest extends AnyFunSpec with Matchers with Inside {
}

it("correctly identifies a dev environment") {
val publicRoot = "https://localhost:8080/catalogue/v2"
val publicRoot = "https://api-dev.wellcomecollection.org/catalogue/v2"
inside(
ApiConfig(
publicRootUri = Uri(publicRoot),
Expand All @@ -48,7 +48,7 @@ class ApiConfigTest extends AnyFunSpec with Matchers with Inside {
) {
case apiConfig@ApiConfig(publicScheme, publicHost, publicRootPath, _) =>
publicScheme shouldBe "https"
publicHost shouldBe "localhost"
publicHost shouldBe "api-dev.wellcomecollection.org"
publicRootPath shouldBe "/catalogue/v2"
apiConfig.environment shouldBe ApiEnvironment.Dev
}
Expand Down
2 changes: 1 addition & 1 deletion concepts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "MIT",
"scripts": {
"start": "NODE_ENV=production ts-node-transpile-only ./server.ts",
"dev": "NODE_ENV=development nodemon ./server.ts",
"dev": "AWS_PROFILE=catalogue-developer PORT=3001 NODE_ENV=development nodemon ./server.ts",
"test": "jest"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions items/src/main/resources/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ content.api.publicRoot="https://api.wellcomecollection.org/content/v0"
content.api.publicRoot=${?content_api_public_root}

http.host="0.0.0.0"
http.port=8080
http.port=8081
http.port=${?app_port}
http.externalBaseURL="http://localhost:8080/"
http.externalBaseURL="http://localhost:8081/"
http.externalBaseURL=${?app_base_url}

aws.metrics.namespace=${?metrics_namespace}
Expand Down
2 changes: 1 addition & 1 deletion search/src/main/resources/application.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
api.public-root="http://localhost"
api.public-root="https://api-dev.wellcomecollection.org/catalogue/v2"
api.public-root=${?api_public_root}
apm.server.url=${?apm_server_url}
apm.secret=${?apm_secret}
Expand Down

0 comments on commit ac6dffa

Please sign in to comment.