Running TeachQ locally
Prerequisites
Install postgres and creating a database
Install postgres on your machine, you can follow this great article by prisma to get you up and running.
Now if everything went according to plan you can run psql in your terminal and create a new database with:
CREATE DATABASE teachq;
That's all we really need to get postgres set up.
Clone and install dependencies
git clone git@github.com:teachq-oss/teachq.git
cd teachq
yarn
Fill in the .env file
First we can copy the .env.example file to .env with:
cp .env.example .env
To get project going with login you will need to have either the GITHUB_ID and
GITHUB_SECRET or the EMAIL settings filled in.
In my opnion the Github one is easier and you can follow this handy guide to get you setup with creating this app.
When it comes to payments we use two providers:
- Stripe - For stripe you will need to create an account and then paste the
STRIPE_SECRETandNEXT_PUBLIC_STRIPE_KEYinto the.envfile. - Paddle - For paddle you will need to create an account in their sandbox enviroment and then paste the
PADDLE_VENDOR_IDinto the.envfile.
The last step that is really needed is your postgres credentials and we are done!.
Starting off prisma
The last step is to migrate prisma to make sure our table looks good and we can start using it.
To do this you can run:
npx prisma migrate dev
We are done 🚀
Now you can run yarn dev to start the server.