Skip to content

Latest commit

 

History

History
87 lines (61 loc) · 2.29 KB

File metadata and controls

87 lines (61 loc) · 2.29 KB

Running natively

WARNING: The recommended setup for PrairieLearn development is within Docker. The setup described on this page is not recommended or supported.

This page describes the procedure to install and run PrairieLearn without any use of Docker. This means that PrairieLearn is running fully natively on the local OS.

git clone https://github.com/PrairieLearn/PrairieLearn.git
cd PrairieLearn
  • Install all dependencies and transpile local packages:
# This one command will do everything!
make deps

# Alternatively, you can run each step individually:
yarn
make build
make python-deps
  • Create the database (one time only):
initdb -D ~/defaultdb
  • Run the database:
pg_ctl -D ~/defaultdb -l ~/logfile start
  • Make sure the postgres database user exists and is a superuser (these might error if the user already exists):
psql -c "CREATE USER postgres;"
psql -c "ALTER USER postgres WITH SUPERUSER;"
  • Run the test suite:
cd PrairieLearn
make test
  • Run the linters:
cd PrairieLearn
make lint # or lint-js for Javascript only, or lint-python for Python only
  • Create the file PrairieLearn/config.json with the path of your local course repository and with the path of a directory into which temporary files will be saved when using the in-browser file editor (edit both paths as needed):
{
  "courseDirs": ["/Users/mwest/git/pl-tam212", "exampleCourse"],
  "filesRoot": "../filesRoot"
}
  • Run the server:
cd PrairieLearn
node server

This should end with PrairieLearn server ready and will remain running in the foreground, so this terminal can't be used for anything else. To stop the server use Ctrl-C, and to restart it repeat the node server command above.