Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 11 23:59
    dependabot[bot] labeled #1021
  • May 11 23:59
    dependabot[bot] opened #1021
  • May 11 23:59

    dependabot[bot] on npm_and_yarn

    Bump lodash from 4.17.19 to 4.1… (compare)

  • May 11 23:26
    dependabot[bot] labeled #1020
  • May 11 23:26
    dependabot[bot] opened #1020
  • May 11 23:26

    dependabot[bot] on npm_and_yarn

    Bump hosted-git-info from 2.6.0… (compare)

  • May 11 14:22
    railway17 closed #1019
  • May 11 14:21
    railway17 commented #1019
  • May 11 14:21
    railway17 commented #1019
  • May 11 13:45
    railway17 opened #1019
  • May 11 12:23
    joodie opened #1018
  • May 09 12:38
    dependabot[bot] labeled #1017
  • May 09 12:38
    dependabot[bot] opened #1017
  • May 09 12:38

    dependabot[bot] on npm_and_yarn

    Bump handlebars from 4.5.3 to 4… (compare)

  • Apr 29 14:09

    XVincentX on v1.16.11

    1.16.11 (compare)

  • Apr 29 14:07
    XVincentX commented #1014
  • Apr 28 16:37
    alexshevch commented #1014
  • Apr 24 04:25
    Jamlee edited #1015
  • Apr 21 10:19
    bilalkalim-nisum-com opened #1016
  • Apr 21 09:42
    Jamlee opened #1015
Rajen Rawal
@rajenrawal_gitlab
I made .env file on root directory then use it on config port: ${HTTP_PORT:-8080}
like this
1 reply
but something not good here
Abdullah khan
@mrabd423_twitter
Hello all, Does any one know any simplest tutorial on how to use express api gateway ?
Samuel Kitazume
@samuelkitazume
Abdullah, you will probably find the documentation quite good. I had no problem getting a test up and running in a few minutes
Btw, guys, quick question on some conditions: pathMatch (built-in) and pathmatch (from rewrite plugin). Why do they use req.url instead of req.path? I think a better solution would be creating a urlMatch and a pathMatch to distinguish... I faced a situation this week that I had to dig into the code to understand how it was handling it.
Job Schipper
@desjob
Anyone has experience with using express gateway to create a REST API for a SOAP service?
ive been searching if there are existing plugins for it, but so far nothing came up. anyone can point me in the right direction on how i could implement it?
Samuel Kitazume
@samuelkitazume:matrix.org
[m]
Never done that but they do have a Request Transformer policy... it’s not so customizable as you need but that means you can create your own policy for your business rules
Although I think what you need is morr a BFF than a Gateway, so you may want to take another approach
ardianp
@ardianp
Hi everybody. When I restart the express-gateway, the users are gone.
How can I get around this?
Al Tsang
@altsang
Get Redis
Read the documentation - you are using the in-memory db
rabiaalam
@rabiaalam
Hi, how to add a custom policy with no action parameters to a pipeline?
Samuel Kitazume
@samuelkitazume:matrix.org
[m]
Why would you want that?
Praveen TVS
@PraveenTvs_twitter
hi i am looking for API gateway
would like to know is express api gateway is community version or it also have liceneced version and where can i check pricing
Samuel Kitazume
@samuelkitazume:matrix.org
[m]
Seems like express-gateway is free to use
malsubmal
@malsubmal
guys
do we have to create a consumer for every new end user?
or am i missing sth?
Samuel Kitazume
@samuelkitazume:matrix.org
[m]
I think it depends on your app actually... do you need some level of authentication? In my case I have no consumers
malsubmal
@malsubmal
ohhhh okay I read the Getting-started and assumed
thanks !
Juan C Soto
@jcsotoarvelaiz
Hi, Is this project maintained? Any idea when node 14 will be supported?
Samuel Kitazume
@samuelkitazume:matrix.org
[m]
jcsotoarvelaiz (Juan C Soto): I’m getting the feeling the project is not very active
But you can take a look at the roadmap in their website
smelezan
@smelezan
Hi, i'm searching a way to stream audio, but I don't know how to pass through gateway, I see the request stream plugin but not much information on this
Samuel Kitazume
@samuelkitazume:matrix.org
[m]
Hmmm it doesn’t look like those are related tho, but I’m no expert on that :(
smelezan
@smelezan
okay :c thanks
Shubham Tyagi
@mshubhamtyagi

Hi Everyone,

I am using microservices in one of my project.

I have a problem let assume we have 4 services & In all my services some files are uploading using multer. Now when I pushing the code the live server then I am facing an issue.

I have a gateway host which is you can assume https://api.xyz.com (It will be localhost in the case of local environment).

Now comes to my services so let assume we have user-service, admin-service so in this serviceEndpoints will be http://localhost:3000 & http://localhost:30001 respectively. Now If I want to access the image in admin service those are uploaded through user service. I need to buy a separate domain for that or a sub domain for that. Now if I have 100 services in my express gateway then I will need 100 domain or sub domains for that.

Please help me.

(PS: This is working correct in case of JSON data just because right now in server environment the service end point is localhost. So it fetch data from DB. But problem with files).

Sushan Shrestha
@sshrestha2_gitlab
@ghost~60064d62d73408ce4ff92107
Sushan Shrestha
@sshrestha2_gitlab
Hello
How do I configure interaction between my own authentication server and Express-Gateway? can someone help please?
Samuel Kitazume
@samuelkitazume:matrix.org
[m]
Hello, what do you mean, Sushan?
Rail Way
@railway17
Hi, Everyone
I want to build simple gateway with express-gateway
My config is like below
  port: 8080
admin:
  port: 9876
apiEndpoints:
  api:
    host: localhost
    paths: "/ip"
  hr:
    methods: 'GET,POST,PUT' 
    host: localhost
    paths: '/api*'
serviceEndpoints:
  httpbin: # will be referenced in proxy policy
    url: 'https://httpbin.org'
  hrService: # will be referenced in proxy policy
    url: 'http://localhost:5000'
policies:
  - basic-auth
  - cors
  - expression
  - key-auth
  - log
  - oauth2
  - proxy
  - rate-limit
pipelines:
  default:
    apiEndpoints:
      - api
    policies:
      - proxy:
          - action:
              serviceEndPoint: httpbin
              changeOrigin: true
  hr:
    apiEndpoints:
      - hr
    policies:
      - 
        cors:
          - action:
              origin: '*'
              methods: ['HEAD','PUT','PATCH','POST','DELETE']
      - 
        proxy:
          - action:
              serviceEndPoint: hrService
Looks like I copied and pasted the sample config but I am getting Bad Gateway response in postman
hrService endpoint is working correctly
but can't reach via gateway
And httpbin endpoint does also respond with bad gateway
what's wrong in my config?
Rail Way
@railway17
Bad Gateway
This is postman response
Miruako
@Miruako
Hi everyone
I've got a problem that I want to add some extra request header when the request pass though the express-gateway.
But I failed with the request-transformer plugin.
Also the headers in pipeline optional reference not works.
Here's my config.yaml file:
pipelines:
  aggregate:
    apiEndpoints:
      - aggregateAPIs
    policies:
      - log: # policy name
          - action:    # array of condition/actions objects
                message: ${req.method} ${req.originalUrl} # parameter for log action
      - cors:
          - action:
                origin: 'http://localhost:4200'
                methods: 'PUT,POST,GET,DELETE,OPTIONS'
                allowedHeaders: ['X-Requested-With', 'Authorization', 'content-type']
                credentials: true
      - sso:
      - key-auth:
          - condition:
              name: expression
              expression: "req.headers['authorization']? req.headers['authorization'].indexOf('apiKey') == 0 : false"
            action:
              message: "consumer key"
      - onboard:
          - condition:
              name: expression
              expression: "req.headers['eg-consumer-id']"
            action:
              message: "3rd party user onboard process"
      - acl:
      - expression: 
          - action:    
              jscode: 'req.url.indexOf("/cogarch/api") == 0 ? req.url = req.url.substring(8, req.url.length) : null;' 
      - error:
      - proxy: # policy name
          - action:
              serviceEndpoint: aggregateService
              changeOrigin: true
              headers:
                request-header-test: "request-header-test"
bkn
@bhargavkn
Hi :wave: Team, I've created two react apps -- one serving on port 3000 and the other serving on port 4000 on my local machine and set up express gateway in front of them. Although I can see the proper sources being shown in the browser's developer tools when I hit the gateway endpoint, the browser is not rendering those pages. The pages are rendering correctly when I hit the individual endpoints corresponding to the react apps. Any idea where I'm going wrong?
Not sure if this is relevant, but the each of the two apps have multiple routes operating within them (Using react's BrowserRouter)