Can I use a Node.js based API in Microgateway?

Not applicable

It appears that the Microgateway does not support Node.js based API proxies. I discovered this after debugging the npm start command and seeing this in the output:

agent:config dropping invalid target { max_connections: -1, name: 'edgemicro_hiker', revision: '1', proxy_name: 'default', base_path: '/microhiker/v1', target_name: 'default', url: '' }

There is no target URL since Node.js APIs use ScriptTarget/ResourceURL not HTTPTargetConnection/URL.

I use a Node.js based API to access a backend MySQL DB by exposing the DB directly, but I'd rather not do that. This seems like a great use case for the Microgateway.

Is this a limitation of the Microgateway?

Solved Solved
1 4 468
1 ACCEPTED SOLUTION

Hi @kurtkanaskie -- I actually noticed this same thing recently, and learned that only HTTP target endpoints are supported with Edge Microgateway. So, your use case of using a ScriptTarget pointing to a Node.js app is not supported. I'll make sure that this is clearly documented.

View solution in original post

4 REPLIES 4

Hi @kurtkanaskie -- I actually noticed this same thing recently, and learned that only HTTP target endpoints are supported with Edge Microgateway. So, your use case of using a ScriptTarget pointing to a Node.js app is not supported. I'll make sure that this is clearly documented.

Hi @wwitman,

Thanks for the quick response. As a work around I can deploy and run my Node.js App on the server directly and then just do a simple Edge Micro HTTP proxy to it.

Yes, that's the right thing to do. If you already have a node.js app, run it on same host or other host and proxy that through EdgeMicro. That's what we mean by internal APIs.