diff --git a/env-vars-testing-local.sh b/env-vars-testing-local.sh index ab10e403..a75d3872 100755 --- a/env-vars-testing-local.sh +++ b/env-vars-testing-local.sh @@ -1,4 +1,3 @@ . ./env-vars-testing.sh . ./.env-local # helpful to store secrets, e.g. credentials for auth0 development tenant export MONGODB_PORT=27117 -export URL_PREFIX="http://localhost:8080" diff --git a/scripts/import-posts.js b/scripts/import-posts.js index 1f4e7311..d7cb9a2e 100644 --- a/scripts/import-posts.js +++ b/scripts/import-posts.js @@ -27,7 +27,7 @@ assert.ok( // Environment const { - URL_PREFIX, + WHYD_URL_PREFIX, MONGODB_HOST, MONGODB_PORT, MONGODB_DATABASE, @@ -51,7 +51,7 @@ const connectToDb = ({ url, dbName }) => { const fetchUserProfile = ({ userId }) => new Promise((resolve, reject) => { - const url = `${URL_PREFIX}/api/user/${userId}?format=json`; + const url = `${WHYD_URL_PREFIX}/api/user/${userId}?format=json`; console.warn(`fetching profile from ${url} ...`); request(url, (err, _, body) => err ? reject(err) : resolve(JSON.parse(body)), @@ -69,7 +69,7 @@ const updateUser = ({ db, user }) => { const fetchUserPosts = ({ userId }) => new Promise((resolve, reject) => { const limit = 99999999; - const url = `${URL_PREFIX}/u/${userId}?format=json&limit=${limit}`; + const url = `${WHYD_URL_PREFIX}/u/${userId}?format=json&limit=${limit}`; console.warn(`fetching posts from ${url} ...`); request(url, (err, _, body) => err