ledidukh Posted January 2, 2018 Report Share Posted January 2, 2018 Hi, I just have downloaded widget example - ftrack-javascript-api-example-react. Then i make npm install and want to run script as server. Could you please help me, how to do that. Link to comment Share on other sites More sharing options...
Lucas Correia Posted January 3, 2018 Report Share Posted January 3, 2018 Hi, Thanks for showing interest in the widget examples. To run the example you linked to in development mode, install the dependencies (`npm install`), and then start the development server using the following command and opening a web browser on port 8001. npm start To build a a production version, you can run `npm build`. The example contains a very minimal webpack configuration, which can be extended. The example can probably be rewritten using create-react-app to avoid having to deal with build configuration etc.. Interesting parts of the example are: Setting up the Javascript API using injected credentials in index.js Fetching and displaying notes in the Notes component. Regards, Lucas Link to comment Share on other sites More sharing options...
ledidukh Posted January 3, 2018 Author Report Share Posted January 3, 2018 After npm start server will works by http protocol. If I understand in order to connect that server with ftrack dashboard it is necessary to deploy it by https protocol and not locally. Is any easy way to do that? Link to comment Share on other sites More sharing options...
Lucas Correia Posted January 3, 2018 Report Share Posted January 3, 2018 Hi, That is correct, if you are cloud-hosted or run the server over HTTPS/SSL, the dashboard widget must also be served over SSL due to the browsers security restrictions. For development, you could run a SSL proxy in front of the development server. To host the built widget, you can google for "static website hosting" for alternatives. It should be possible to host it on AWS S3, Google's storage service, github, etc.. I believe you can use e.g. dropbox for static website hosting as well. Regards, Lucas Link to comment Share on other sites More sharing options...
Mike Overbeck Posted September 25, 2019 Report Share Posted September 25, 2019 I've tried running npm install on this react example. I get an error with the reference to the ftrack-web-widget.git. Is there a way to get this working, or can we get an updated widget example with updated references? snippet of npm logs below: 1658 error Error while executing: 1658 error /usr/bin/git ls-remote -h -t ssh://git@bitbucket.org/ftrack/ftrack-web-widget.git 1658 error 1658 error git@bitbucket.org: Permission denied (publickey). 1658 error fatal: Could not read from remote repository. 1658 error 1658 error Please make sure you have the correct access rights 1658 error and the repository exists. 1658 error 1658 error exited with error code: 128 1659 verbose exit [ 1, true ] Link to comment Share on other sites More sharing options...
Lucas Correia Posted September 26, 2019 Report Share Posted September 26, 2019 Thanks for reporting the issue. I have pushed a commit which replaces the git+ssh dependencies with git+https. This should fix the permission error you are seeing. Regards, Lucas Link to comment Share on other sites More sharing options...
Mike Overbeck Posted September 26, 2019 Report Share Posted September 26, 2019 Thank you Lucas, npm installs and starts correctly now. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now