Obsolete as of 2023. See https://github.com/hylang/hyhomepage instead.
# Clone the repo
git clone https://github.com/allison-casey/hy-interpreter.git
cd hy-interpreter
The backend is a serverless zappa flask app. Installation must happen inside a virtualenv to support Zappa.
# Create the server venv
cd server
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
# To run locally, export these env vars before
# running 'flask run'
export FLASK_APP=flaskr
export FLASK_ENV=development
flask run
The client app is a clojurescript reagent application built
with shadow-cljs
and deployed to github pages.
# Return to the root repo dir
cd hy-interpreter
# Install the npm dependencies
npm install
# Start the development server
npx shadow-cljs watch app
# Init Zappa Settings
# This requires aws cli to be installed, set up, and
# a valid ~/.aws/credentials file
zappa init
# Deploy the flask app to AWS Lambda
zappa deploy
zappa deploy
will print out the base url that the backend
can be reached at. Save this for setting up the client app.
# To set the endpoint url for this deployment
# create a file called 'config.edn' that contains the end
# point url we saved when we ran 'zappa deploy' with the
# following command (Leave the surrounding double quotes in)
echo '{:closure-defines {hyinterpreter.events/REACT_APP_API_BASE "<ENDPOINT-URL>"}}' > config.edn
# Deploy the app to Github Pages
npm run deploy