How to host sfari-frontpage¶
Clone sfari-frontpage repo:
git clone git@github.com:iossifovlab/sfari-frontpage.git
Install dependencies:
cd sfari-frontpage
npm install
Host gpf and gpfjs
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",
]
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&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>
Run sfari-frontpage:
cd sfari-frontpage
ng serve --port 4201
Navigate to the sfari-frontpage at http://localhost:4201/