INNER CODE UNIT · TypeScript

fn

tcgdex/cards-database · server/src/index.ts:72

		const fn = async () => {
			await updateDatas()
				.then(() => console.log('loaded cardmarket datas'))
				.catch((err) => console.error('error loading cardmarket', err))
			await updateTCGPlayerDatas()
				.then(() => console.log('loaded TCGPlayer datas'))
				.catch((err) => console.error('error loading TCGPlayer', err))
		}

		// auto update each hour the datasets
		// @ts-expect-error f*ck off
		await fn()
		setInterval(fn, 86_400_000)
	}


	console.log('🚀 Server ready at localhost:' + port);
} else {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…