Git Product home page Git Product logo

robert-meetup's People

Contributors

hpatoio avatar robertcasanova avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

open-meetup

robert-meetup's Issues

Deploy in ambiente di test

@hpatoio hai qualche idea per questo?

Forse si può deployare su Netlify aggratis altrimenti posso configurare PM2 e prendere una VPS su Ovh o simili. Che dici?

Blocked by #5

Aggiungere autenticazione all'api di aggiunta del meetup

Come "amministratore"
Quando uno o più organizzatori richiedono la creazione di un meetup
Voglio poter aggiungere un nuovo meetup.

Questo flusso per ora sarà manuale, poi potrà essere automatizzato in un secondo momento per dare la possibilità agli organizzatori di creare i propri meetup magari pagando una minima fee per il costo di upload su Arweave... da capire.

In questa fase può essere anche una cosa molto semplice con un middleware di Express che controlla un bearer preimpostato.

Pseudocodice:

export const isAuthorized  = (req, res, next) => { 
if(req.headers.authorization === "Bearer ciccopasticcio") 
next()
else
res.status(401).send("Suka!)

@hpatoio Che dici?

Gestione risposte asincrone

Ciao @hpatoio, sto cercando di mettere su un sistema per gestire le risposte asincrone con delle code.
Puoi buttare un occhio a questo e dirmi se ti torna l'approccio? Thx

const organizationsQueue = new Queue(
  "organizations-queue",
  "redis://localhost:6379" // require redis running
);

const wait = () =>
  new Promise((res) => {
    setTimeout(res, 10000);
  });

organizationsQueue.process(async (job, done) => {
  console.log("processing...");
  await wait();
  // deploy organization smart contract via Defender
  // deploy arweave document
  console.log("done");
  done(null, {
    id: "1234", // arweave hash
  });
});

export const add = async (req: Request, res: Response) => {
  console.log("New job...");
  const job = await organizationsQueue.add({});
  console.log("New job...created");
  return res.status(200).json({
    jobId: job.id,
  });
};

export const getStatus = async (req: Request, res: Response) => {
  const job = await organizationsQueue.getJob(req.params.id);
  const status = await job?.getState();
  return res.json({
    status,
    data: job?.returnvalue, // arweave hash for getter
  });
};
 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.