Prototype for ASTE -platform
Instructions for setting up a development environment for the prototype.
Step 1: Install PostgreSQL
Step 2: Install JRE
example:
java -Dserver.port=8090 -Dserver.contextPath=/loggerModule -jar logger-module-1.0-SNAPSHOT.jar
Dserver.port -> the Port you wish to run LoggerModule
Dserver.contextPath -> Url prefix (in the example it would be http://localhost:8090/loggerModule)
<add name="APIDiscoveryContext" connectionString="Server=[PostgreSQL ip];Port=[PostgreSQL port];User Id=[PostgreSQL user];Password=[PostgreSQL password];Database=APIDiscovery" providerName="Npgsql" />
example:
<add name="APIDiscoveryContext" connectionString="Server=127.0.0.1;Port=5432;User Id=postgres;Password=asteuser;Database=APIDiscovery" providerName="Npgsql" />
<add name="FormModuleContext" connectionString="Server=[PostgreSQL ip];Port=[PostgreSQL port];User Id=[PostgreSQL user];Password=[PostgreSQL password];Database=ASTE" providerName="Npgsql" />
example:
<add name="FormModuleContext" connectionString="Server=127.0.0.1;Port=5432;User Id=postgres;Password=asteuser;Database=ASTE" providerName="Npgsql" />
Change the API Discovery port to the following projects web.config:
ASTE.Public.Rest
ASTE.Modules.FormModule
ASTE.Processes.Mielenterveysseura
<appSettings>
<!-- ASTE API Discovery url -->
<add key="API_Discovery_Url" value="http://localhost:[YOUR PORT]" />
</appSettings>
ASTE.Demos.Mielenterveysseura
ASTE.Modules.APIDiscovery
ASTE.Modules.FormModule
ASTE.Processes.Mielenterveysseura
ASTE.Public.Rest
- url: the url you defined in step 3, example
http://localhost:8090/loggerModule
- version:
1.0
- If everything went fine, you should be redirected to the modules index page.
- Page should redirect back to module index page, and on the
LoggerModule
, Active should betrue
- url: http://localhost:[The Port you assigned in IIS]/api
- version:
"1.0"
- url:
http://localhost:[The Port you assigned in IIS]/api
- version:
"1.0"
- Name: Toni Iltanen
- Client IP: 127.0.0.1
- Client name: Test app
ASTE.Demos.Mielenterveysseura/Views/Shared/_Layout.cshtml
, in line number 204
example:
$.ajaxSetup({
beforeSend: function (xhr) {
xhr.setRequestHeader('api_key', 'your-new-api-key');
}
});
4. Change the public REST API URL (ASTE.Public.REST
) in the following positions, to the one you installed it on IIS
ASTE.Demos.Mielenterveysseura/Views/Home/Index.cshtml
, in line number 38
url: "http://localhost:[Your port]/api/1.0/process",
ASTE.Demos.Mielenterveysseura/Views/Home/Index.cshtml
, in line number 73
url: "http://localhost:[Your port]/api/1.0/process",
ASTE.Demos.Mielenterveysseura/Views/Home/Index.cshtml
, in line number 87
url: "http://localhost:[Your port]/api/1.0/process",
Navigate to the demo web application by adding /lapset-puheeksi/lokikirja
to your your ASTE.Demos.Mielenterveysseura
site on IIS: