Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Access the node.js directly from CQ using sighlty

Avatar

Level 2

Hi,

We are developing the service layer in node.js and we need to access the service layer directly from the CQ instance using sightly ( without using any CQ bundle)

It would be great if you can share some urls/documentation for the same. 

 

Thanks

Samb

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

I am not that familiar with node.js but can you not expose your service layer as REST calls and then consume them directly from CQ Components?

- Runal

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

I am not that familiar with node.js but can you not expose your service layer as REST calls and then consume them directly from CQ Components?

- Runal

Avatar

Level 10

You are not using JCR to store data in this use case, you want to use node.js and you want to access it using Sightly without a Java bundle? IS this correct? 

If so -- I would recommend accessing node.js via Java:

https://strongloop.com/strongblog/node-js-java-getting-started/

When writing Sightly components, you can use Java as shown here:

https://helpx.adobe.com/experience-manager/using/creating-sightly-component.html

I do not think it's possible to access node.js from Sightly without using Java. 

Avatar

Level 2

Yes. I have exposed the node.js as a REST service and trying to access directly from sightly. My service will have the url like below and provide the json output.

https://maps.googleapis.com/maps/api/directions/json?origin=Boston,MA&destination=Concord,MA&waypoin...

Thanks

Samb