From 5c319538759c6265fc1119b726538bb89bd71cc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Sverre=20Lien=20Sell=C3=A6g?= Date: Fri, 8 Jul 2022 21:55:02 +0200 Subject: [PATCH] lat --- bin/scrape.mjs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/bin/scrape.mjs b/bin/scrape.mjs index e7f2a88..f7752f9 100644 --- a/bin/scrape.mjs +++ b/bin/scrape.mjs @@ -2,10 +2,18 @@ import { get_page_events } from '../src/facebook/get-page-events.mjs'; import send from '../src/signal/send.mjs'; import fetch from 'node-fetch'; -const api = 'http://localhost:3333'; -const token = - // '831411806230c7e950c4eeb226499ef92bb6bdc4157797929a0e16d133dc13a8'; - '1234567812345678123456781234567812345678123456781234567812345678'; +const prod = false; + +let api, token; + +if (prod) { + api = 'http://10.0.0.210:8484'; + token = '831411806230c7e950c4eeb226499ef92bb6bdc4157797929a0e16d133dc13a8'; +} else { + api = 'http://localhost:3333'; + token = '1234567812345678123456781234567812345678123456781234567812345678'; +} + const headers = { 'Content-Type': 'application/json' }; const scrape = async (pageID) => {