Access the node.js directly from CQ using sighlty | Community
Skip to main content
Samb
New Participant
October 16, 2015
Solved

Access the node.js directly from CQ using sighlty

  • October 16, 2015
  • 3 replies
  • 2611 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Runal_Trivedi

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

3 replies

Runal_Trivedi
Runal_TrivediAccepted solution
New Participant
October 16, 2015

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

smacdonald2008
New Participant
October 16, 2015

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. 

Samb
SambAuthor
New Participant
October 16, 2015

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&waypoints=Charlestown,MA|via:Lexington,MA&key=API_KEY

Thanks

Samb