A web app for matching tutors with students who wish to be tutored
There are a few different ways to run the server
To build and start the app in a Docker container listening on port 8080, run
make build
scripts/docker.sh prod up
This will npm install
any dependencies (if node_modules
is missing), compile all necessary files, build the container, and start it. This includes a MariaDB server.
To start the app in development mode, run
scripts/docker.sh dev up
This does the same as start-docker
, but it will watch Typescript files for changes, compile them and restart the server. It also makes node
listen on port 9229 for debuggers (--inspect
).
To further customize the behavior of docker, you may pass additional arguments to scripts/docker.sh
.
These are passed as arguments to docker-compose
.
All required environment variables must be set for this to work
The app can alse be ran outside of Docker. To build and run the app, run
make start
For more build tasks, see Makefile
To load some convenient aliases, run
source scripts/env.sh
dockdev build && dockdev up # start docker container for development
Environment variables will be loaded from a .env
file in the root of the project. These will be overriden by process environment variables.
PORT
(default: 8080) The port that the application will listen atPUBLIC_URI
(default:'http://localhost:$PORT'
) The root URI that the application is serving from. This is used for generating URIs for links and redirectsGOOGLE_CLIENT_ID
,GOOGLE_CLIENT_SECRET
(required) The client settings required to access Google OAuth2 APIsSESSION_SECRET
(required) The secret forexpress-session
. Should be randomly generated.TYPEORM_*
(required) A set of variables configuring the connection to the database. For more info, see this page documenting the variables. If running in Docker, this will be set by the container.