Skip to content

aidangris/PairProj

 
 

Repository files navigation

This is a Next.js project bootstrapped with create-next-app.

Getting Started

  1. Install dependencies

    Install NPM

    Install Docker

  2. Create env file write this at some point

  3. Set up local DB with Docker

    Verify that docker is installed and running with the docker desktop app. Then run the following command in your terminal.

       docker-compose up -d

    Whenever you are out of development mode, you can close it with

       docker-compose stop

    If you ever need to reset the DB. ONLY USE IT IF YOU'RE SURE YOU'RE USING THE LOCAL DB.

      docker-compose down

    Then, finally seed the database. Run the commands

       npm run db:push
       npm run db:seed //SEED IS STILL A TODO

    When making any changes to the database, or pulling in someone else's changes, make sure you migrate your local DB.

      npm run db:generate
      npm run db:migrate
  4. View local DB

    If you want to view the contents of the database you can run the command. You can also test run SQL and Drizzle queries here.

       npm run db:studio

    If you want to more directly view it through PGAdmin (which is unlikely necessary), you can optionally take these steps: First run

      docker container ls

    and copy the hash of the postgres image. You can then run

      docker inspect <hash>

    Scroll up a little, and you will see an IPaddress. Copy this. Then go to localhost:5050 and login with the email and password in .env. Click add new server, and go over to the connections tab. Put the IPaddress as the hostname/address in the connections, and take the username/password from the .env file.

  5. Get development server running First, install necessary packages

    npm i

    Lastly, run the development server:

    npm run dev

    Open http://localhost:3000 with your browser to see the result.

    You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.

    This project uses next/font to automatically optimize and load Inter, a custom Google Font.

Learn More

To learn more about our tech stack, take a look at the following resources:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 99.0%
  • Other 1.0%