How to run ftrack-javascript-api-example-react
3 3

4 posts in this topic

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

Share this post


Link to post
Share on other sites

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?

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
3 3