Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 25 10:13

    icebob on master

    Add support for rediss:// cacher Merge pull request #837 from Ha… (compare)

  • Nov 25 10:13
    icebob closed #837
  • Nov 25 10:11
    icebob milestoned #836
  • Nov 25 10:11
    icebob labeled #836
  • Nov 25 10:11
    icebob labeled #836
  • Nov 25 10:10
    icebob commented #836
  • Nov 24 14:52
    coveralls commented #837
  • Nov 24 14:51
    coveralls commented #837
  • Nov 24 14:50
    coveralls commented #837
  • Nov 24 14:50
    coveralls commented #837
  • Nov 24 13:56
    HazemKhaled edited #837
  • Nov 24 13:56
    HazemKhaled edited #837
  • Nov 24 13:56
    HazemKhaled edited #837
  • Nov 24 13:56
    HazemKhaled edited #837
  • Nov 24 13:56
    HazemKhaled edited #837
  • Nov 24 13:56
    HazemKhaled edited #837
  • Nov 24 13:55
    HazemKhaled edited #837
  • Nov 24 13:54
    HazemKhaled opened #837
  • Nov 24 13:47
    cs4inctec opened #836
  • Nov 19 23:42
    Telokis commented #822
Hesusmordino
@Hesusmordino
hello, im using AMQP transport in my project, how i can find exchange name and queue name?
i want to recieve messages from internal server, outside of moleculer framework
Neer
@neer14

Hi, i need to populate field
i used like this

settings: {
    populates:{ 
      "categories": "categories.get"
    }
}

this.adapter.find({
        query : {
          status: 2,
          _id: project_id
        },
        populate : ['categories']
      });

but it doesne't work

i need data like this
[
        {
            "status": 2,
            "name": "Test Name"
            "categories": [
                {
                    "_id": 1,
                    "name": "Collectibles"
                },
                {
                    "_id": 34,
                    "name": "watch"
                }
            ]
        }
]
instead it returns like this
[
        {
            "status": 2,
            "name": "Test Name"
            "categories": [1,34]
        }
]
Feugang Kemegni Fabrice
@fabrigeas
@neer14 use 'fields' not 'populate'

Hi guys,

I am trying to authenticate some routes and not others.
anyone has an idea?

/api/users
/api/posts

Neer
@neer14
@fabrigeas
documentation says fields are for filter
@fabrigeas
auth:false ?
*authorization: false
Feugang Kemegni Fabrice
@fabrigeas
You can use youse dependencies to make a service depend on another.
you can also register an event and wait for service A to be created, then run a given funtion in your service B
Feugang Kemegni Fabrice
@fabrigeas
Hi guys,
how can I set the cookies in the request header from the service.action?
I am implementing a signin action from my users service and I would like to return an access-token in the header from the action.
Anyone has an idea?
Ingwie Phoenix
@IngwiePhoenix
Hello there! I am coming here off the back of a StackOverflow question I asked in regards to microservice architecture. Basically, while I was planning my application, I had initially planned it to spawn multiple processes, each holding a service. Each service would need to communicate with one another either by calling methods directly or sending events to a queue so that other services pick them up and process accordingly. Now, all the Moleculer examples I have come across so far have either shown various services in Docker-Compose being networked through NATS or a single broker hosting multiple services. Now, how would I go about having Moleculer spawn, for instance three, processes? Since each service represents one service, let's just call them chat, notifications and users. Any idea? Thanks!
Wesley-Alves
@Wesley-Alves
Hello, how to disable the default route in moleculer-web? (https://github.com/moleculerjs/moleculer-web/blob/master/src/index.js#L64)
Bartha Bela Tibor
@belabartha
@icebob I want to use the Datadog tracer, but I'm just getting individual service calls, but I'm interested in the whole flow (from input event to output). Is there a straightforward setup for this? Or should I create child/sub-child spans for every action called through the flow?
I see, that you have something similar in Moleculer documentation (https://moleculer.services/docs/0.14/tracing.html#Datadog)
Jarod Reid
@fugufish
@icebob working on error handling in the moleculer-ruby library, what is the appropriate error to pass back to the caller when the endpoint throws a non-moleculer exception?
Puria Kordrostami
@kordeviant
Hello, how to handle multipart formdata without any file?
MOULALI M
@Moulali1995
Hey @icebob
How can i use the socket instance inside other services? I can see that this.io is available in started() life cycle method.
How to obtain that instance in other services? I'm using the below example
https://github.com/moleculerjs/moleculer-web/blob/master/examples/socket.io/index.js
Shubham Jain
@shubh-07
Hi. Can someone guide me through moleculer communication protocol.
I am facing Protocol Version Mismatch error.
I am not able to find the cause for this error.
The packet version is coming to be 4
and service broker version is coming 3.
André Mazayev
@AndreMaz
The protocol mismatch means that some of your nodes use moleculer v0.13 and others v0.14. v0.13 uses protocol version v3 while v0.14 uses protocol version v4.
They are incompatible (https://github.com/moleculerjs/moleculer/blob/master/CHANGELOG.md#communication-protocol-has-been-changed)
IMPORTANT: We are moving to Discord (link: https://discord.gg/TSEcDRP)! Support @Gitter is no longer guaranteed
hezbon otumba
@oloohezbon
Is there away to initialise sequelize adapter without the model definition?
HighSoftWare96
@HighSoftWare96
Hi. I'm using a file upload endpoint with moleculer-web... I'm parsing the stream coming to the action but after that the response returning is always wrapped inside an array... Is there a way to avoid that?
hezbon otumba
@oloohezbon
@AndreMaz what is the community name is Discord?
Amila Viduranga
@AmilaViduranga
hi team, I want to upload multipart/ftm-data file with greater than 5MB, how should I do that
André Mazayev
@AndreMaz
IMPORTANT: We are moving to Discord (link: https://discord.gg/TSEcDRP ) ! Support @Gitter is no longer guaranteed
sakibindia
@sakibindia
I am new in moleculerjs
me: {
auth: "required",
rest: "GET /admin",
cache: {
keys: ["#userID"]
},
async handler(ctx) {
const admin = await this.getById(ctx.meta.admin._id);
if (!admin)
throw new MoleculerClientError("Admin User not found!", 400);
const doc = await this.transformDocuments(ctx, {}, user);
return await this.transformEntity(doc, true, ctx.meta.token);
}
},
how to test it in postman
when i test it through this url "http://localhost:3000/api/admin"
i got Cannot read property '_id' of undefined
is this programing fault or something missing in postman,
please urgent help me
Hoàng Thành
@hoangthanh212
@sakibindia : Check your login function. Is it already set the ctx.meta.admin correctly ?
Alessandro Valenti
@valenti1234
Hi there how can I use moleculer from a VUE webpack browser application ? Thanks.
Zeeshan Haider
@zeeshanalisyed
Hey guys
I listed that issue on github as well
still no solution may be I am missing something
Mohammad Majid Khan
@majidk061
Hey
how to upload file using multer in moleculer
any one have idea i don't want to use busboy for file upload
Bruno Carneiro
@Tautorn

Hi there.
How do I change bodyparser json limit in moleculer-web?
Attempt:

@Service({
    name: "api",
    mixins: [
        ApiGateway,
   ],
   settings: {
        routes: [
            {
                authentication: true,
                whitelist: [
                    'api.ok',
                ],
                aliases: {
                    '/': 'api.ok',
                },
                bodyParsers: {
                    json: { limit: "5MB" },
                    urlencoded: { extended: true, limit: "5MB" }
                }
            }]
    }
})

But don't work =/

phuongpt0301
@phuongpt0301
Screen Shot 2020-08-30 at 09.45.29.png
I have problems about start services. Can you help me, please?
Satish Adabala
@apsnaidu

Hia,
Being a newbie to moleculerjs I'm trying to use passport with moleculerjs for authorization using Azure AD passport plugin. Thanks to the mixin https://github.com/icebob/kantab/blob/master/backend/mixins/passport.mixin.js by @icebob I'm able to apply the authorization at the alias level in API gateway service successfully. Now I'm trying to extend this functionality by using this mixin in a dedicated identity service that does the authentication and authorization based on the service name passed to it. I was thinking of using the authorize method of API gateway to forward the requests to identity service if theauthorization route setting is set to true. However, when I call the identity service using ctx.call method the passport mixin is not being invoked! Here is my authorize method.

    async authorize(ctx, route, req) {
      let verified;
        // Verify JWT token
        try {
          verified = await ctx.call("identify.verifyToken");
          if (verified) {
            this.logger.info("Authenticated via JWT: ", user.username);
            ctx.meta.user = _.pick(user, ["_id", "username", "email", "image"]);
            ctx.meta.token = token;
            ctx.meta.userID = user._id;
          }
        } catch (err) {
          console.log(err);
          throw new UnAuthorizedError(ApiGateway.Errors.ERR_INVALID_USER);
        }
      }

and here is the snippet of my identity service

const passportMixin = require("../mixins/passport.mixin");
module.exports = {
  name: "identity",
  mixins: [passportMixin({ successRedirect: "/api/v1/customer" })],
  settings: {
    routes: [],
    aliases: {},
  },
    actions: {
      verifyToken: {
        rest: "GET /verify",
        async handler(ctx) {
          try {
            console.log("Token is being verified");
          } catch (err) {
            console.log(err);
          }
        },
      },
    },
};

The passport mixin is defined to apply passport plugin at alias level like below and the callback is set to forward the request to a customer service

        route.aliases["GET /verify"] = (req, res) =>
          passport.authenticate("oauth-bearer", { session: false })(
            req,
            res,
            callback(req, res)
          );

I would've thought the identity service invokes the passport plugin before running the verifyToken method but the plugin doesn't get invoked and only the method is run printing the debug statement. My question is can I use passport mixin in other services than API gateway service and if so, what am I doing wrong here?

Thanks in advance!

Zeeshan Haider
@zeeshanalisyed
I want to build a File Upload Rest Api
What is the best practice
Zeeshan Haider
@zeeshanalisyed
How to disable JSON body parser for file uploads
for the specific route or service