Folder Location for index.js

8 views
Skip to first unread message

Sorcerer Stone

unread,
Jul 15, 2016, 1:35:03 AM7/15/16
to OpenHIM-Implementers
Hello All,

On the page for setting up NodeJS Mediator: http://openhim.readthedocs.io/en/latest/tutorial/3-creating-a-passthrough-mediator.html
After mediator is installed, and "app/config/mediator.json" is updated, the instruction said "Next, open up app/index.js." in order to set up the end points: app.get('/encounters/:id', function (req, res) ...

Can someone be kind enough to tell me where this folder "app/index.js" is?

I followed the manual and created this folder "tutorialmediator" and setup the mediator using yeoman. When I searched for index.js in tutorialmediator folder, there are currently 480 "index.js" in this folder!

Thanks in advance.
Sorcerer

Martin Brocker

unread,
Jul 15, 2016, 3:07:02 AM7/15/16
to Sorcerer Stone, OpenHIM-Implementers
Hi Sorcerer

When doing a search for "index.js" within the "tutorialmediator" folder it will bring back quite a few results due to all the node_modules that have been installed. Index.js is the starting point for these individual modules. The index.js file referred to in the tutorial is for the mediator itself so you will need to navigate to "tutorialmediator/app/index.js"

Warm Regards,
Martin

--
You received this message because you are subscribed to the Google Groups "OpenHIM-Implementers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openhim-implemen...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Martin Brocker
Software Developer
Jembi Health Systems NPC | SOUTH AFRICA
Office: +27 21 701 0939 | Skype: martin.brocker

E-MAIL DISCLAIMER:

This e-mail contains proprietary and confidential information some or all of which may be legally privileged. It is for the intended recipient only. If an addressing or transmission error has misdirected this e-mail, please notify the author by replying to this e-mail and then deleting same. If you are not the intended recipient you must not use, disclose, distribute, copy, print or rely on this e-mail. Jembi Health Systems NPO, its subsidiaries and associated companies is not liable for the security of information sent by e-mail and accepts no liability of whatsoever nature for any loss, damage or expense resulting, directly or indirectly, from the access of this e-mail or any attachments hereto.

Sorcerer Stone

unread,
Jul 15, 2016, 10:29:19 AM7/15/16
to OpenHIM-Implementers, sorcer...@gmail.com
Hello Martin,
What you described is the problem that I see. I think my mediator cannot be installed correctly (even though I followed the instructions). There is no app folder under tutorialmediator folder, that was why I have to search for this file and thought the manual may refer to the "openhim-core-js-master" or the "console" folders. I attached the screenshot for my tutorialmediator folder for reference.

What may cause the app folder in tutorialmediator not creating during installation?
What would you recommend me to do to get over this issue?

Regards,
Sorcerer




On Friday, July 15, 2016 at 3:07:02 AM UTC-4, Martin Brocker wrote:
Hi Sorcerer

When doing a search for "index.js" within the "tutorialmediator" folder it will bring back quite a few results due to all the node_modules that have been installed. Index.js is the starting point for these individual modules. The index.js file referred to in the tutorial is for the mediator itself so you will need to navigate to "tutorialmediator/app/index.js"

Warm Regards,
Martin
On Fri, Jul 15, 2016 at 7:35 AM, Sorcerer Stone <sorcer...@gmail.com> wrote:
Hello All,

On the page for setting up NodeJS Mediator: http://openhim.readthedocs.io/en/latest/tutorial/3-creating-a-passthrough-mediator.html
After mediator is installed, and "app/config/mediator.json" is updated, the instruction said "Next, open up app/index.js." in order to set up the end points: app.get('/encounters/:id', function (req, res) ...

Can someone be kind enough to tell me where this folder "app/index.js" is?

I followed the manual and created this folder "tutorialmediator" and setup the mediator using yeoman. When I searched for index.js in tutorialmediator folder, there are currently 480 "index.js" in this folder!

Thanks in advance.
Sorcerer

--
You received this message because you are subscribed to the Google Groups "OpenHIM-Implementers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openhim-implementers+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
SS_Index_JS.jpg

Sorcerer Stone

unread,
Jul 19, 2016, 1:14:58 AM7/19/16
to OpenHIM-Implementers, sorcer...@gmail.com
Hello Martin,
I solved the problem. I did not have a problem in the first place.

When the online manual asked to create a folder for mediator and to issue the command "npm install -g generator-mediator-js", the file index.js was not created in that folder the manual instructed me to create. In Windows, the file in question is hide in the folder "generator-mediator-js" under node modules sub branches. And this node modules is a branch in the npm folder which in turn sits in the Roaming directory - in a completely different path set up by Windows.

So I was looking in vain for the file in the wrong location for the longest time. Curse of using Windows environment.

SS

Martin Brocker

unread,
Jul 19, 2016, 2:43:56 AM7/19/16
to Sorcerer Stone, OpenHIM-Implementers
Hi Sorcerer

Great! I'm glad you managed to resolve the issue you had. I'm unfortunately not that familiar with the Windows OS anymore so would have struggled to figure that one out :).

Warm Regards,
Martin

To unsubscribe from this group and stop receiving emails from it, send an email to openhim-implemen...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Martin Brocker
Software Developer
Jembi Health Systems NPC | SOUTH AFRICA
Office: +27 21 701 0939 | Skype: martin.brocker

E-MAIL DISCLAIMER:

This e-mail contains proprietary and confidential information some or all of which may be legally privileged. It is for the intended recipient only. If an addressing or transmission error has misdirected this e-mail, please notify the author by replying to this e-mail and then deleting same. If you are not the intended recipient you must not use, disclose, distribute, copy, print or rely on this e-mail. Jembi Health Systems NPO, its subsidiaries and associated companies is not liable for the security of information sent by e-mail and accepts no liability of whatsoever nature for any loss, damage or expense resulting, directly or indirectly, from the access of this e-mail or any attachments hereto.

--
You received this message because you are subscribed to the Google Groups "OpenHIM-Implementers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openhim-implemen...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages