Skip to content

locdb/locdb-frend

Repository files navigation

LOCDB Fr(ont-)end

Travis badge Docker Automated build

This repository provides a guided user interface for extrapolation of new data for the Linked Open Citation Data Base.

Recent Branch Updates

Tue Jul 31

  • master stored in oldstable
  • dev was merged into master

Basic setup

  1. Clone this repository and run npm install to install dependencies.
  2. Run ng serve and access the prototype via localhost:4200

Deployment on remote web server

  1. Run ng build --base-href=/<subdir>/ to deploy files into dist
  2. with care: Copy the files to the remote web server scp dist/* <server>:/<PATH/TO/SITE/>

Development setup

Update angular-cli to the latest version

npm remove -g angular-cli
npm install -g @angular/cli@latest

Source

Install dependencies

rm -rf node_modules dist
npm install -g typescript
npm install

Rebuild back-end client

  1. Go to Swagger Code Generator
  2. Select POST /gen/clients/{language} 'Generates a client library' and press 'Try it out' button
  3. Select typescript-angular as the target language for the client library and insert the following snippet as body:
{
  "spec": {},
  "options": {
    "modelPropertyNaming": "original",
    "ngVersion": "6.1"
  },
  "swaggerUrl": "https://locdb.bib.uni-mannheim.de/locdb-dev/swagger",
  "authorizationValue": {
    "value": "string",
    "type": "string",
    "keyName": "string"
  },
  "securityDefinition": {
    "type": "string",
    "description": "string"
  }
}
  1. Press Execute button and inspect the response body for the link.
  2. Unzip the downloaded code and place typescript-angular2-client as subdirectory in src/app.

Development Resources