From 37d284ebaa5ca1c8516e87a462cf16876973fb31 Mon Sep 17 00:00:00 2001 From: Timothy Date: Thu, 4 Aug 2022 21:53:27 +0200 Subject: [PATCH] Clarifying README.md (#13) --- .gitignore | 1 + README.md | 25 +++++++++++++++++-------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 22813e7c4a..3820f70b09 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ # misc .DS_Store *.pem +.idea/ # debug npm-debug.log* diff --git a/README.md b/README.md index be9a3271aa..8754db664a 100644 --- a/README.md +++ b/README.md @@ -63,34 +63,43 @@ To get the project running locally on your machine you need to have the followin git clone https://github.com/snoopForms/snoopforms.git && cd snoopforms ``` -2. Install Node.JS packages: +2. Install Node.JS packages via yarn. Don't have yarn? Use `npm install --global yarn`. ``` yarn install ``` -3. Create a `.env` file based on `.env.example` and change it according to your setup. Make sure the `DATABASE_URL` variable is set correctly according to your local database. +3. Make sure you have a running database instance, e.g. by using docker. A quick and dirty instance can be spun up via: + +``` +docker run --name snoopformsDB -p 5432:5432 -e POSTGRES_USER=snoopforms -e POSTGRES_PASSWORD=password -e POSTGRES_DB=snoopforms -d postgres +``` + + +4. Create a `.env` file based on `.env.example` and change it according to your setup. Make sure the `DATABASE_URL` variable is set correctly according to your local database. For the signup process, an email server with valid SMTP data is necessary. ``` cp .env.example .env ``` -4. Use the code editor of your choice to edit the .env file. You need to change all fields according to your setup. The SMTP-credentials are essential for verification emails to work during user signup. - -5. Make sure your PostgreSQL Database Server is running. Then let prisma set up the database for you: +For the example above, use the following: +``` +DATABASE_URL='postgresql://snoopforms:password@localhost:5432/snoopforms?schema=public' ``` +5. Use the code editor of your choice to edit the .env file. You need to change all fields according to your setup. The SMTP-credentials are essential for verification emails to work during user signup. + +6. Make sure your PostgreSQL Database Server is running. Then let prisma set up the database for you: + +``` yarn prisma migrate dev - ``` 6. Start the development server: ``` - yarn dev - ``` **You can now access the app on [https://localhost:3000](https://localhost:3000)**. You will be automatically redirected to the login. To use your local installation of snoopForms, create a new account.