Server for stable, curated Haskell package sets
Go to file
ncaq 05337cd782 fix(opensearch): search url protocol: http -> https
Changed the protocol of the URL used as a custom search engine from `http` to `https`.

The reason for this change is that `www.stackage.org` only uses `https`,
so every time the custom search engine is used,
a redirect from `http` to `https` occurs,
sacrificing the cleanliness of the history.

On `www.stackage.org`,
the HTTP header is set to
`strict-transport-security max-age=15724800; includeSubDomains` for HSTS,
so there's no need to try connecting via http.

This is a bit unclear to me as well,
but even though HSTS is set and a redirect is set for subsequent access,
it seems that no communication is being made,
but it is left in the history.

In any case,
I think it's wasteful to constantly access http when it's specialized for https to the point of setting HSTS,
so I'm making this commit.
2023-08-04 12:21:23 +09:00
.github/workflows foo 2022-04-21 13:04:28 +03:00
app update to lts-18 2023-06-25 15:40:17 +08:00
bench Infer pg pool size from number of caps by default 2020-11-15 00:21:21 +03:00
config /stats endpoint 2020-10-16 04:21:08 +03:00
design New homepage and new top nav (#52) 2014-12-14 20:18:40 +01:00
docker Bump base 2021-03-26 10:34:49 +03:00
src fix diff/ ordering of cased packages with consistent use of toCaseFold 2023-06-25 20:54:45 +08:00
static fix(opensearch): search url protocol: http -> https 2023-08-04 12:21:23 +09:00
templates remove the <h3>Hoogle before the hoogle search box 2021-07-05 15:12:09 +08:00
.dir-locals.el Integration with Pantry and usage of new stackage-snapshots: 2019-04-30 17:10:33 +03:00
.dockerignore Include Git history 2020-04-05 18:29:46 +03:00
.ghci Integration with Pantry and usage of new stackage-snapshots: 2019-04-30 17:10:33 +03:00
.gitignore Integration with Pantry and usage of new stackage-snapshots: 2019-04-30 17:10:33 +03:00
.hindent.yaml Integration with Pantry and usage of new stackage-snapshots: 2019-04-30 17:10:33 +03:00
.stylish-haskell.yaml Integration with Pantry and usage of new stackage-snapshots: 2019-04-30 17:10:33 +03:00
indices Add a migration for index creation on stanpshot creation date 2020-11-15 03:20:41 +03:00
LICENSE Root file fixes 2017-12-11 18:54:27 +02:00
package.yaml update to lts-18 2023-06-25 15:40:17 +08:00
README.md readme: tweaks 2023-06-25 15:55:23 +08:00
stack.yaml update to lts-18 2023-06-25 15:40:17 +08:00

stackage-server

Runtime image

Server for stable, curated Haskell package sets

This repo is part of the Stackage project, and the live server can be viewed at https://www.stackage.org.

Building locally

Build locally by passing the dev flag to it:

$ stack build . --flag stackage-server:dev

Simple testing with sqlite:

To test the UI without real data, just run:

$ yesod devel

(install the yesod executable from yesod-bin).

Testing with postgresql

Now, initially you need to run the cron job to create and populate the database:

$ export PGSTRING=postgresql://postgres:password@localhost:5432/stackage
$ stack exec stackage-server-cron

Note that you need to modify the PGSTRING environment variable according to your actual database configuration. Also, you need to create an empty database before running the cron job. Note that it takes quite some time for it to load your database.

After this, run the stackage server:

$ export PGSTRING=postgresql://postgres:password@localhost:5432/stackage
$ stack exec stackage-server