Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Mar 05 13:57
    intech commented #100
  • Mar 05 04:31
    devalexandre reopened #885
  • Mar 05 04:25
    devalexandre commented #885
  • Mar 05 04:25
    devalexandre closed #885
  • Mar 05 04:22
    devalexandre opened #885
  • Mar 03 13:20
    AndreMaz edited #874
  • Mar 03 11:09
    AndreMaz commented #875
  • Mar 03 00:25
    AndreMaz commented #875
  • Mar 02 22:05
    AndreMaz commented #875
  • Mar 02 21:20
    AndreMaz commented #875
  • Mar 02 20:46
    AndreMaz commented #875
  • Mar 01 18:00
    icebob milestoned #778
  • Mar 01 16:31

    icebob on fix-878-880

    (compare)

  • Mar 01 16:30

    icebob on master

    add isDate, fix array date conv… Merge pull request #883 from mo… (compare)

  • Mar 01 16:30
    icebob closed #883
  • Mar 01 13:25
    icebob transferred #884
  • Mar 01 13:25
    icebob commented #884
  • Mar 01 12:52
    RickAtreides commented #884
  • Mar 01 12:24
    RickAtreides commented #884
  • Mar 01 12:20
    icebob commented #884
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
thachnhanhbl
@thachnhanhbl
image.png
image.png
image.png
I cant publish image
help me
image.png
Hoàng Thành
@hoangthanh212
@thachnhanhbl : I dont think u need to put /public/ in url
just localhost:3000/filename.jpg
thachnhanhbl
@thachnhanhbl
thanks for support
Screen Shot 2020-12-21 at 12.34.58 AM.png
Screen Shot 2020-12-21 at 12.35.15 AM.png
help me how to config return oject, not array. thanks
i want to cofig image single
Hoàng Thành
@hoangthanh212

Screen Shot 2020-12-21 at 12.35.15 AM.png

Your question not clear... if u want fast response just go discord channel https://discord.com/channels/585148559155003392/585148559754657799

nphuocnguyen2000
@nphuocnguyen2000
s
thachnhanhbl
@thachnhanhbl
hello, I want to deploy 2 moleculer in a server. how to install the server? thanks
AhsanNissar
@AhsanNissar
const busBoy = new Busboy({ headers: "" });
busBoy.on("file",(fieldname, file, filename, encoding, mimetype) => {
console.log(filename,fieldname,mimetype,file,encoding);
});
I am gettin this error. 'Header are already sent'. What does this mean? I received an excel file and now I am trying to read its data but getting an error
what do i need to set in headers?
const busBoy = new Busboy({ headers: "" }); busBoy.on("file",(fieldname, file, filename, encoding, mimetype) => { console.log(filename,fieldname,mimetype,file,encoding); });
AhsanNissar
@AhsanNissar
{
"name": "MoleculerClientError",
"message": "File missing in the request",
"code": 400
}
Can anyone tell why this is saying file is missing. I am sending an excel file here