diff options
-rw-r--r-- | requirements.txt | 4 | ||||
-rwxr-xr-x | server.sh | 38 | ||||
-rwxr-xr-x | web/bun.lockb | bin | 95159 -> 95159 bytes |
3 files changed, 41 insertions, 1 deletions
diff --git a/requirements.txt b/requirements.txt index a893983..d2820f8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,3 @@ -scrapy==2.11.1 +Flask==3.0.3 +flask_cors==4.0.1 +Scrapy==2.11.1 diff --git a/server.sh b/server.sh new file mode 100755 index 0000000..8e06c93 --- /dev/null +++ b/server.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash + +# Check that pylucene is installed +pip show lucene &> /dev/null +if [ $? -ne 0 ]; then + echo "pylucene is not installed." + echo "It cannot be installed via pip, so you must install it manually." + echo "Install it manually to continue..." + echo "Or run this script inside a docker container/devcontainer provided in the repository." + exit 1 +fi + +# Install the required packages +python3 -m pip install -r requirements.txt + +# Check whether npm, yarn, or bun is installed +if ! command -v npm &> /dev/null && ! command -v yarn &> /dev/null && ! command -v bun &> /dev/null; then + echo "npm, yarn, or bun is not installed." + echo "Please install one of them to continue..." + exit 1 +fi + +# Build the frontend +pushd web +if command -v bun &> /dev/null; then + bun install + bun run build +elif command -v npm &> /dev/null; then + npm install + npm run build +else + yarn install + yarn run build +fi +popd + +# Run the server +flask run diff --git a/web/bun.lockb b/web/bun.lockb Binary files differindex bdd5167..85d0b16 100755 --- a/web/bun.lockb +++ b/web/bun.lockb |