Real-Dev-Squad / wisee-backend

Quiz Application Backend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wisee backend

Setup

To setup this project, you need to install the following tools:

Windows

Skip this step if you are running the project in a Unix based system or have make already installed.

We use the make command to run different scripts in the project. Install make command from here

Development Setup

  1. Once you have installed the above tools, clone the repository and navigate to the project folder.

  2. To setup the project, run the following command:

make setup
  1. If the above command runs successfully, you can start the development server by running the following command:
make watch

To check if the server is running, navigate to http://localhost:8080/health in your browser.

Creating a production build

To create a production build, run the following command:

make build

This will create a executable file in the bin folder.

Migrations

Migrations are handled using golang-migrate, read the docs for more information on working with migrations.

Database

Connecting to the database

  1. Visit http://localhost:54321 in your browser and login with the following credentials:

    • Email : default@wisee.com
    • Password : default
  2. If you do have server created already, create a new server by clicking on the Add New Server button.

    alt text

  3. Enter the server name

    alt text

  4. Enter the connection details

    • Hostname/Address : pg_db
    • Port : 5432
    • Username : postgres
    • Password : postgres

    alt text

  5. Click on the Save button. You should now be able to see the server and associated databases in the left sidebar.

    alt text

About

Quiz Application Backend

License:MIT License


Languages

Language:Go 82.8%Language:Makefile 7.2%Language:PLpgSQL 5.2%Language:Dockerfile 3.6%Language:Shell 1.2%