Endpoints and configuration files - acrotron-spezvuz/auralization-proto GitHub Wiki

API

Endpoints

  1. /swagger or /index.html - endpoints for Swagger UI
  2. /api/auralization - auralization endpoint, wrapper of NAFlib

Configuration files

  1. nlog.config - configuration for NLog logging package
  2. appsettings.json - configuration for production environment
  3. appsettings.Development.json - configuration for development environment
  4. appsettings.< Environment >.json - configuration for < Environment > environmont

{
"Logging": {
"LogLevel": {
"Default": "Trace",
"Microsoft": "Information"
}
},
"AllowedOrigins": [
"an-url-of-the-spa-project"
]}

AllowedOrigins is for CORS, it is a list of domains as shown above. Only allowed domains can make a cross-domain requests to the api. Basically this list contain only one item: an URL of the SPA project without trailing slash '/'. Example:

  1. Production configuration: "AllowedOrigins": [ "http://auralization.us-east-1.elasticbeanstalk.com"]
  2. Development configuration: "AllowedOrigins": [ "https://localhost:44395"]
  3. Standalone IIS configuration depends on selected domain names.

SPA

Endpoints

  1. / or /index.html - main web page, auralization source and results
  2. /api/config - configuration endpoint, returns an url of the auralization api

Configuration files

  1. appsettings.json - configuration for production environment
  2. appsettings.Development.json - configuration for development environment
  3. appsettings.< Environment >.json - configuration for < Environment > environmont

{
"ApiSettings": {
"AuralizaitionEndpoint": "an-url-of-the-api-project"
}}

AuralizaitionEndpoint is a url to the API project. Example:

  1. production configuration:
    "AuralizaitionEndpoint": "http://auralization-api.us-east-1.elasticbeanstalk.com/api/Auralizarion"
  2. Development configuration: "AuralizaitionEndpoint": "https://localhost:44321/api/Auralizarion"
  3. Standalone IIS configuration depends on selected domain names.