Starting own module


#1

I have wirte own simple module folio-mymodule and did put it in folder okapi
ModuleDiscriptor.json

{
“id” : “mymodule”,
“name” : “Hello EBSCO”,
“provides” : [ {
“id” : “mymodule”,
“version” : “1.1”,
“handlers” : [ {
“methods” : [ “GET”, “POST” ],
“pathPattern” : “/mymodule”
} ]
} ],
“launchDescriptor” : {
“exec”:“folio-mymodule”
}
}
in purpose to test

  1. started okapi success
  2. in other terminal window curl -i -w ‘\n’ http://localhost:8080/mymodule
    error curl: (7) Failed to connect to localhost port 8080: Connection refused

what could be the issue ??


#2

It seems that you need to follow the Okapi Guide and Reference

For example, by default Okapi is running on port 9130, and (apart from the wrong port) that curl command is not complete.