Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: make UI dev easier #1278

Merged
merged 4 commits into from
Jan 18, 2023
Merged

chore: make UI dev easier #1278

merged 4 commits into from
Jan 18, 2023

Conversation

markphelps
Copy link
Collaborator

This takes advantage of https://vitejs.dev/guide/backend-integration.html and allows us to still load the UI on port :8080 when developing while taking advantage of hot reloading provided by Vite.

The instructors are updated in DEVELOPMENT.md, but basically the steps are:

  1. Run npm run dev where you have the flipt-ui repository checked out. This will start a development server on port 5173 and proxy API requests to the Flipt API on port 8080.
  2. Run mage dev from the this repository. This will create a dev build that will serve the UI from the development server, while still making it accessible on port 8080.
  3. Run the binary with the local config: ./bin/flipt --config ./config/local.yml. This will enable CORS with the correct configuration and start the server on port 8080.
  4. Visit http://localhost:8080 to see the UI.
  5. Any changes made in the flipt-ui repository will be picked up by the development server and the UI will be reloaded.

@markphelps markphelps requested a review from a team as a code owner January 18, 2023 15:00
@codecov-commenter
Copy link

codecov-commenter commented Jan 18, 2023

Codecov Report

Merging #1278 (b31cf09) into main (5af0757) will decrease coverage by 0.19%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1278      +/-   ##
==========================================
- Coverage   79.82%   79.63%   -0.19%     
==========================================
  Files          42       42              
  Lines        3217     3217              
==========================================
- Hits         2568     2562       -6     
- Misses        521      525       +4     
- Partials      128      130       +2     
Impacted Files Coverage Δ
internal/storage/oplock/sql/sql.go 90.82% <0.00%> (-5.51%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@GeorgeMac GeorgeMac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat!

@markphelps markphelps merged commit 7a7c757 into main Jan 18, 2023
@markphelps markphelps deleted the ui-dev branch January 18, 2023 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants