How does FHIRBASE2 require path work ?

61 views
Skip to first unread message

ren...@gmail.com

unread,
Jun 13, 2016, 9:10:18 AM6/13/16
to FHIRbase

I managed to get the FHIRBASE2 project working , but i'm not sure how the plv8 require path works.

e.g The path for the search is given as

var mod = require("/fhirbase/src/fhir/search.litcoffee")

but my real absolute path to the project is
/home/ehruser/fhirbase-plv8/src/fhir/search.litcoffee


I changed the search.litcoffee to another name and the search still worked, so i guessed the files
got copied to another directory .. but the find cmd didnt find any search.litcoffee

Are the files copied somewhere else ? or is it symlinked to /home/ehruser/fhirbase-plv8 somewhere?


Николай Рыжиков

unread,
Jun 13, 2016, 1:20:37 PM6/13/16
to ren...@gmail.com, FHIRbase

fhirbase build logic is located in https://github.com/fhirbase/plpl. During build we use absolute paths, but deps are resolved relatively (this is due to node specific).

--
You received this message because you are subscribed to the Google Groups "FHIRbase" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fhirbase+u...@googlegroups.com.
To post to this group, send email to fhir...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fhirbase/32b3dc95-d143-4df2-9b65-5b7447a24699%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ren...@gmail.com

unread,
Jul 8, 2016, 6:22:14 AM7/8/16
to FHIRbase, ren...@gmail.com
Ok, took me a few days to figure out that all the code gets compiled into the pvl8_init() and require() was in the pvl8_init() ..
and not a normal coffeescript require function.

PS: Don't trust the line numbers in pgadmin code view.. actual no. of lines is 7k= but the line number in the code view says 311...

Rama
Reply all
Reply to author
Forward
0 new messages