Skip to content

Commit

Permalink
adding logging
Browse files Browse the repository at this point in the history
  • Loading branch information
amyfromandi committed Aug 26, 2024
1 parent 19845f6 commit 9b475c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"scripts": {
"start": "nodemon --watch v2 --exec ts-node --transpileOnly server.ts",
"docker": "docker build -t macrostrat-api . && docker run --rm -it macrostrat-api",
"docker": "docker build -t macrostrat-api . && docker run --rm -it -p 5000:5000 macrostrat-api",
"serve": "ts-node --transpileOnly server.ts",
"test": "mocha ./v2",
"defs": "ts-node --transpileOnly ./v2/utilities/validateDefs.ts",
Expand Down
4 changes: 3 additions & 1 deletion v2/larkin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ const { Client, Pool } = require("pg");
//get all units and summarize for columns
http.get(
//TODO: cahnge url to match env.
"http://web.staging.svc.macrostrat.org/api/v2/units?all&response=long",
"http://localhost:5000/v2/units?all&response=long",
function (res) {
var body = "";
res.on("data", function (chunk) {
Expand All @@ -655,6 +655,8 @@ const { Client, Pool } = require("pg");
console.log(res)
console.log(body)
console.log(res.statusCode)
console.log(res.headers)

console.log("redirected to ", res.headers.location)


Expand Down

0 comments on commit 9b475c7

Please sign in to comment.