This README outlines the details of collaborating on this Ember application. A short introduction of this app could easily go here.
You will need the following things properly installed on your computer.
cd waypoint/ui
yarn install
If you are trying out UI changes on a pull request and don't want to run Ember locally, you can build the static assets and compile it into Waypoint server.
Run the following commands to build the UI and compile it into Waypoint Server:
cd ui
make
cd ..
make static-assets
make docker/server
Then when that finishes, you will be able to install the locally built server into Docker or another platform to try out the UI changes.
There are two modes of development.
This returns data in-browser with Mirage.js (a mocking framework) active. This means that the network requests will be intercepted and return mocked objects that are static and are re-loaded on page refresh.
ember serve
- The app will be available at http://localhost:4200.
- When prompted for a token, you can use any non-empty string (i.e.
my-cool-token
)
Troubleshooting:
- If you run into issues with
ember serve
, try deleting the directoryui/node_modules/
, rerunningyarn install
, and rerunning anember serve
.
This option assumes there is a Waypoint server running
at https://localhost:9702
, which you can verify by visiting https://localhost:9702 in the browser.
If you need to make any API changes to go along with frontend changes, or just wish to run the server locally, you can follow the instructions to run Waypoint server locally.
- Visit https://localhost:9702, and accept the invalid certificate warning.
ember serve local
- The app will be available at http://localhost:4200. Make sure that you are in the same browser session (e.g. a new tab) where you accepted the invalid certificate warning above.
- When prompted for a token, run
waypoint user token
in the command line, and enter the response.
If you need to build the server and run it locally, you'll want to stop the existing instance, build and reinstall it in docker:
docker stop waypoint-server; docker rm waypoint-server; docker volume prune -f
make docker/server
waypoint install -platform=docker -docker-server-image="waypoint:dev" -accept-tos
Then run the authentication steps above again.
if you've made API changes in /internal/server
and want to use those on the frontend, you'll need to generate the type definitions again:
- MacOS only:
brew install gnu-sed
then follow the instructions to replace the defaultsed
- Download the 1.1.2 release of
mockery
and install in your/go/bin
directory - Install
protoc
3.17.3 - Install
ts-protoc-gen
:yarn global add ts-protoc-gen
ornpm i -g ts-protoc-gen
- Install
protoc-gen-grpc-web
:brew install protoc-gen-grpc-web
make docker/tools
make docker/gen/server
make gen/ts
Make use of the many generators for code, try ember help generate
for more details
ember test
ember test --server
npm run lint:hbs
npm run lint:js
npm run lint:js -- --fix
ember build
(development)ember build --environment production
(production)
Specify what it takes to deploy your app.