Skip to content

KnightHacks/admin-tool-frontend-2022

Repository files navigation

2022 Knight Hacks Admin Tool

This repository is the home for the admin tool used by our hackathon organizers to manage hackathons and the attendees, sponsors, and events at each one.

Installation

https://github.com/KnightHacks/admin-tool-frontend-2022
cd admin-tool-frontend-2022
npm install

You will also need to create a .env file at the top level directory of the project. The contents should contain the following keys:

# The URL of the Knight Hacks API you are targeting - ex: https://api-dev.knighthacks.org/
API_ENDPOINT=

Getting Started

To run a live development server, run the following in a terminal:

npm run start

This will host the website at http://localhost:3000. As you make updates to the code, the development server will automatically reload the page.

Building the Docker Image Locally

Build this app into a Docker image:

docker build -t <image_name> .

Run the image as a container:

docker run -itd -p 9090:9090 [--name <container_name>] <image_name>

-i, -t, -d, --name are optional flags. Reference: https://docs.docker.com/engine/reference/run/.

-p 9090:9090 is required and based on the configured port in the Dockerfile and the NGINX config (default.config).

You can now use the website through the url http://localhost:9090 in your browser of choice.

Updating the API Submodule

To get any changes made to the API submodule, run git submodule update --remote

For a detailed guide of handling submodules, see here