Giter Club home page Giter Club logo

collaboratory_app's Introduction

Collaboratory App Example

Up and running

Install your environment

virtualenv venv
. venv/bin/activate
pip install -r requirements.txt

Trust SSL certificate

You also need to trust the SSL certificate in ssl/localhost.crt. Even better is to replace it with your own. The procedure for generating a self-signed certificate is readily available on-line.

Create a new HBP OpenID Connect client

The OpenID Connect Client Manager can be found in the Collaboratory at this url:

https://collab.humanbrainproject.eu/#/collab/54/nav/1051

When configuring you test client.

  1. Pick a meaningful name (probably something related to your App name)
  2. Select 'Server flow' application type
  3. Add to 'Authorized redirect URL' a local testing url: https://localhost:8000/complete/hbp/
  4. Ensure that the scopes hbp.collab, hbp.document and hbp.notification.self are checked.
  5. Save your client registration

Save the "Client ID" and "Client Secret" values for the next step.

Define your environment

Copy .env-sample to .env

Replace SECRET_KEY with the output of the following command:

OSX:

date | md5

Linux or Cygwin:

date | md5sum

Replace HBP_OIDC_CLIENT* with the data collected from the OpenID Connect Client Manager in the previous step.

cp .env-sample .env

Create the database

You can now run the migration in order to bootstrap the database.

python manage.py migrate

Start the server

You can then start the server

python manage.py runsslserver --certificate=ssl/localhost.crt --key=ssl/localhost.key

Start the server

From another terminal open an example URL to test your new app:

OSX:

open https://localhost:8000?ctx=2BB5C05D-C417-4ED7-8D4D-C4F940DA8328

Linux:

xdg-open https://localhost:8000?ctx=2BB5C05D-C417-4ED7-8D4D-C4F940DA8328

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.