Skip to content

LaunchPadLab/veritext-replacement-template

Repository files navigation

Veritext Replacement Template

Structure

  • fe - Frontend
    • config - Configuration files
      • application.yml - Application enviromental variables for both fe and be configuration
  • be - Backend
    • prisma - Postgres ORM

Getting Started

  1. Clone the repo
  2. yarn setup
  3. Configure fe/config/application.yml with your own local postgres connection url like postgresql://username@localhost:5432/veritext_box
  4. Due to the way prisma loads env variables in development, you will need to make sure your pg connection url is set to DATABASE_URL in your .env file located at be/prisma/.env
  5. yarn db:migrate:dev
  6. yarn db:seed (optional)
  7. yarn dev

Troubleshooting Prisma

  • If you are having trouble getting your DATABASE_URL to work, try running yarn db:generate and then yarn db:migrate:dev again.

Setting Up Postgres Locally

If you don't have postgres installed locally, you can use the following commands to get it set up.

brew install postgresql
brew services start postgresql

There are several guides to creating a database using the homebrew cli tool, but the following is a quick guide to get you started with pgAdmin4.

  1. Install pgAdmin4
https://www.pgadmin.org/download/pgadmin-4-macos/
  1. Open pgAdmin4
  2. After opening pgAdmin4, you will be prompted to create a "master password". This is the password you will use to login to pgAdmin4. You can just click enter to skip this password step or you can create a password.
  3. Click Add New Server
  4. Under the General tab, give your database a name in the input field labeled Name
  5. Click the Connection tab
  6. Under Host name/address, enter localhost
  7. Under Port, enter 5432
  8. Keep username as postgres
  9. Keep password empty
  10. Click Save

Now you should be taken to the dashboard of your database. If you followed the steps above, your connection string should be postgresql://postgres@localhost:5432/database_name. You can use this connection string to connect to your database using the DATABASE_URL variable in your .env file.

Resources

Notion

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages