Configuring Nikita Noark 5 Core for remote web access

Ole Aamot oka at oka.no
Wed Jun 21 12:52:31 CEST 2017


On Mon, Jun 12, 2017 at 2:43 PM, Ole Aamot <oka at oka.no> wrote:
> On Sat, Jun 10, 2017 at 11:24 PM, Petter Reinholdtsen <pere at hungry.com> wrote:
>> [Ole Aamot]
>>> I am successfully running Nikita Noark 5 Core on a Debian server
>>> (nikita) and the node.js web service accessed in the Chrome web
>>> browser on a remote client machine (portable).
>>
>> Very glad to hear it is working for you.  Note, the node.js web service
>> (on port 3000) is as far as I can tell a simple web server, and you can
>> use apache or any other web server to service the files under web/ if
>> you want to.
>
> Good.

Correction:

If you run the node.js web service on port 3000 (for instance the server
machine "nikita.oka.no") and want to access Nikita Noark 5 Core server
from a remote machine ("portable"), you must also change the following
in nikita-noark5-core/web/dependencies/internal/config.js with your
server (replace "nikita.oka.no" with your own unique hostname or IP).

diff --git a/web/dependencies/internal/config.js
b/web/dependencies/internal/config.js
index c639b21..cfbef9a 100644
--- a/web/dependencies/internal/config.js
+++ b/web/dependencies/internal/config.js
@@ -5,10 +5,10 @@

 nikitaOptions = {
     //baseUrl: "http://n5test.kxml.no/api",
-    baseUrl: 'http://localhost:8092/noark5v4',
-    guiBaseUrl: 'http://localhost:3000/',
-    appUrl: 'http://localhost:8092/noark5v4/hateoas-api',
-    loginUrl: "http://localhost:8092/noark5v4/auth",
+    baseUrl: 'http://nikita.oka.no:8092/noark5v4',
+    guiBaseUrl: 'http://nikita.oka.no:3000/',
+    appUrl: 'http://nikita.oka.no:8092/noark5v4/hateoas-api',
+    loginUrl: "http://nikita.oka.no:8092/noark5v4/auth",
     protocol: 'http',
     appName: 'noark5v4',
     apiName: 'hateoas-api',

After you have made the changes in web/dependencies/internal/config.js,
you must launch the Nikita Noark 5 Core and node.js server as described
in https://lists.nuug.no/pipermail/nikita-noark/2017-June/000306.html

In Terminal 1:

# cd nikita-noark5-core/
# make

In Terminal 2:

# cd nikita-noark5-core/web/
# make run

git clone https://github.com/oleaamot/noark5-parser.git
cd noark5-parser/
./runparser

When you have imported the Noark 5 arkivstruktur.xml files with
noark5-parser, you can open Google Chrome or Chromium on
http://nikita.oka.no:3000/ (replace "nikita.oka.no" with your own
hostname or IP) and login with the username "admin" and the
password "password" to test the GUI.

> The duplicate bug was fixed as I ran curl_exec twice in a row, but
> there is still work on the remaining Noark 5 endpoints such as
>
> dokumentbeskrivelse
> dokumentobjekt.
> avskrivning
> korrespondansepart

I changed license for noark5-parser from MIT License to
GNU General Public License version 3 and now work on
implementing these elements in noark5-parser.

See https://github.com/HiOA-ABI/nikita-noark5-core/ and
https://lists.nuug.no/mailman/listinfo/nikita-noark/ for more
details about the Nikita Noark5 Core project.

Happy hacking,
Ole Aamot


More information about the nikita-noark mailing list