/example-orcid-spa

Example single page application to use the associated Example API to test out the ORCID API.

Primary LanguageJavaScript

Example ORCID Single Page Application

This is an Example single page application that uses the Example ORCID Application API.

Instructions

  1. Make sure you have node.js and git installed on your machine
  2. In the application folder run $ npm install to install the project dependencies
  3. Install gulp.js via the Mac terminal or Gitbash on a PC $ sudo npm install -g gulp
  4. Run the Gulp command $ gulp or $ gulp prod (sometimes twice to get the right code into the prod build)
  5. View the site at http://localhost:8000

Hosting

To deploy this code to Firebase:

  1. Create a new app in Firebase.
  2. Click "Set up Hosting" for the app
  3. Install Firebase tools if necessary ($ npm install -g firebase-tools or $ sudo npm install -g firebase-tools)
  4. Run $firebase login if necessary and then run $firebase init and choose the app you created
  5. Set builds/prod as the public root
  6. Deploy with $ firebase deploy

Demo

Check out a Sandbox Demo. You can create a new SPA and use the same settings but you'll get redirected to the demo application. To redirect to your new SPA update the site_url part of the redirect_uri part of AUTHORIZE_URL in builds/dev/js/app/app-constants.js. If you create a new version of the Example ORCID Application API you'll need to update the first part of the redirect_uri part of the AUTHORIZE_URL in builds/dev/js/app/app-constants.js.