- Copy the
.env.prodor.env.devfile into.envand modify to your needs.- Make sure you set the correct value for the
NODE_ENVvariable:productionmode will enable obfuscation and domain lock;developmentmode will generate source maps. BASE_DOMAINvariable should contain the domain name under which the app will be publicly accessible.BASE_PATHvariable should contain the path portion of the base URL under which the app will be publicly accessible.HARVEST_CLIENT_IDshould contain OAuth2 application client ID that you can obtain in the Harvest settings section. Please note that the application redirect URI should point to exactly the same domain you specified in theBASE_DOMAINvariable. Wildcard domains won't work for client-side applications.
- Make sure you set the correct value for the
- Run
npm installto install all required dependencies - Run
npm run buildto build the project.
You can find compiled files in the dist folder.
To successfully add the app to JIRA it should be publicly accessible with HTTPS protocol. Usually it's hard to achieve on a developer machine. In that case it's easier to use ngrok.io:
- Start ngrok and point it to your local web server: for example,
ngrok http 80orngrok http -host-header=rewrite strategery-jira-harvest.test:80. - Set the
BASE_DOMAINvariable in your.envfile to the domain name of your ngrok tunnel instance (e.g.71e6574d.ngrok.io). - Build the app.
- Update the Redirect URI of the OAuth app in Harvest.
- Add the add-on to your JIRA through the 'Upload add-on' option using the URL to your
atlassian-connect.jsonfile (e.g.https://71e6574d.ngrok.io/atlassian-connect.json).
Also, npm run watch is useful when developing to do incremental compilation for changed files only.