How to host sfari-frontpage

  1. Clone sfari-frontpage repo:

git clone git@github.com:iossifovlab/sfari-frontpage.git
  1. Install dependencies:

cd sfari-frontpage
npm install
  1. Host gpf and gpfjs

  2. In gpf, edit gpf/wdae/wdae/wdae/settings.py CORS_ORIGIN_WHITELIST to include sfari-frontpage url (“http://localhost:4201”):

CORS_ORIGIN_WHITELIST = [
    "http://0.0.0.0:8000",
    # For docker-compose
    "http://localhost:9000",
    "http://127.0.0.1:9000",
    # For local development with `ng serve`
    "http://localhost:4200",
    "http://localhost:4201",
    "http://127.0.0.1:4200",
    # For local development
    "http://localhost:8000",
    "http://127.0.0.1:8000",
]
  1. In sfari-frontpage, edit sfari-frontpage/src/index.html to comment out the base href:

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>GPF: Genotypes and Phenotypes in Families</title>
<!-- <base href="/frontpage_prefix/"> -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link href="https://fonts.googleapis.com/css?family=Roboto:400,500,700&amp;subset=latin-ext" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
</head>
<body>
<app-root></app-root>
</body>
</html>
  1. Run sfari-frontpage:

cd sfari-frontpage
ng serve --port 4201
  1. Navigate to the sfari-frontpage at http://localhost:4201/