Skip to content

VladislavsPerkanuks/FeatureToggles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Feature Toggles

Stack

Frontend

  • Angular v17
  • Angular Material v17

Backend

  • Golang v1.22
  • Gin v1.9
  • GORM v1.25
  • SQlite

How to run

Docker (Recommended)

Be sure that ports 8081 and 80 are available. Else you can change the ports in the compose.yaml file.

    # Backend
    ports:
      - "{PORT_FOR_BACKEND}:8081" # Default: 8081
    # NGINX
    ports:
      - "{PORT_FOR_FRONTEND}:80" # Default: 80

Then run:

docker-compose up -d

Then you can access the application at http://localhost:{PORT_FOR_FRONTEND}

Local

Start Backend

cd backend
export DEMO="true" # Populate the database with fake data
go run cmd/main.go

Start Frontend

cd frontend
npm install
npm start

Then you can access the application at http://localhost:4200

Additional REST Endpoint

The endpoint that determines if feature is active for user it at POST /api/v1/customers/:customerID

The tests in backend/pkg/model/feature_test.go, corresponds to the Example API response in the homework document.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published