DEV Community

Discussion on: Implementing a serverless API proxy in 10 minutes

Collapse
 
sophek profile image
sophek

Thanks for this tutorial. Quick question how do I consume the serverless function apart from warpjs?

const hello = (name) => {
// warp directive
'warp +server -client'

return Hello ${name} from Node.js ${process.version}
}

Could I go to xxxxxxxx.url/hello? or something?

Collapse
 
Sloan, the sloth mascot
Comment deleted
Collapse
 
sophek profile image
sophek

Thank you, This is a promising technology. I'll be willing to help in any way, I'm a vuejs / javascript developer and designer, and also a documentary filmmaker and video editor. Let me know if I can help in promoting this tech. I can probably use this tech in my Cleanvid project. cleanvid.org, the site is not done yet.

Thread Thread
 
domis66 profile image
Dominique Péré

Thank you for your proposition :) That's awesome. Let's talk in private then.

Collapse
 
domis66 profile image
Dominique Péré

Hi Sophek, actually WarpJS does not expose an HTTP REST API on top of the function. It uses its own protocol to wrap the function parameters (that may not be primitive types) and required context elements to run it serverless. When done, it returns also the result (again, maybe an object) to get back to the awaiting front-end context. Both frontend and backend need to be coded in JavaScript, but you can use any framework.