mirror of
https://github.com/kiteco/kiteco-public.git
synced 2024-09-11 13:38:04 +03:00
.. | ||
go | ||
web | ||
.gitignore | ||
Makefile | ||
PREVIEW.md | ||
README.md |
Development Guide
React App
The base Kite Answers code lives in ./web/render
. A complementary React app for previewing lives in ./web/preview
.
To test any changes, you'll need to:
- run
npm link
in the./web/render
directory, thennpm link @kiteco/kite-answers-renderer
, in either the Preview app, or the Webapp.- This only needs to be done once, unless the dependency is re-installed (during the deployment process, we run
npm i @kiteco/kite-answers-renderer@latest
to grab the latest changes).
- This only needs to be done once, unless the dependency is re-installed (during the deployment process, we run
- Build the app, either with
npm run build-dev
, ornpm run build-prod
for an obfuscated output file. This needs to happen each time the renderer is updated. - Run the preview app or webapp with
npm run
.- For the Webapp, optional args may be passed in to hit different hostnames, refer to each package's
package.json
for details. - The preview app's endpoints are defined in
./web/preview/utils/constants.js
. Until the process is improved, we'll need to update the values manually if another hostname is desired.
- For the Webapp, optional args may be passed in to hit different hostnames, refer to each package's
Preview Server
To test changes with the go preview server:
- Execute
go run ./go/cmds/preview-server/
- You can open
localhost
in your browser to render the currently bindata'd React bundle.
To deploy changes to the preview server:
- Make sure you have credentials to our team's prviate npm repo
- If any changes were made in the
render
package, from the project's root dir, runnpm version {x}
wherex
increments the current version inpackage.json
, thennpm publish
. - Go to the root
kite-answers
directory. Runmake preview-app && make assets && make deploy-preview
.
Publishing Flow
To run the publishing command line tool, you'll need:
- AWS CLI
- AWS Credentials
- Docker Desktop (for first time setup, go to
./go/execution/sandbox/
and run the Makefile to setup dependencies). - Access to https://github.com/kite-answers/answers
For now, we'll need to check out and pull the repo locally to grab the latest content.
To run the actual tool:
- Run
go run ./go/publish/main.go {...}
where{...}
is the path to the Kite Answers posts path. - Wait for the output file to be generated. (Current implementation will take awhile).
- Upload file to S3 in the bucket
kite-data/kite-answers
.