Here are several approaches to restrict API access to our frontend:
import cors from '@fastify/cors';
fastify.register(cors, {
console.log
'1' after 1 second,
'2' after 2 seconds and
'3' after 3 seconds after start of the program.
The delay parameter only guarantees that your callback will not execute before that time has elapsed. Other queued tasks or operations could delay it further than the specified time.
const startTime = process.hrtime();
We use mongo:4.4.6 because of Error: MongoDB 5.0+ requires a CPU with AVX support. Container failed to start Solution from here: https://stackoverflow.com/questions/70818543/mongo-db-deployment-not-working-in-kubernetes-because-processor-doesnt-have-avx You may be can use mongo:latest
docker-compose.yml
version: "3.8"
const url = URL.createObjectURL(new Blob());
const UUID = url.substring(url.lastIndexOf('/') + 1);
https://medium.com/teads-engineering/generating-uuids-at-scale-on-the-web-2877f529d2a2