This app written with ExpressJS, Redux and ReactJS makes use of the educational resource integration mechanisms into the Schul-Cloud. It's based on tahnik/react-expressjs.
- OAuth2 authentication: GET /
- LTI authentication: POST /launches
- Roster via OAuth2
- Deep Linking
- Depseudonymization via Iframe
- LRS feedback (WIP)
Copy server/config.example.js
to server/config.js
and put in the right values.
Create a SSH key pair and save the private key in server/private_key.pem
.
For the local development setup, you can copy 'server/cert.dev.pem' and 'server/key.dev.pem' to 'server/cert.pem' and 'server/key.pem'.
Node Version: v9.0.0^
Just clone this repo or download the zip file. cd
into the directory and run
npm install
Developing App with Hot Reload
To develop the react application, you can take advantage of React Hot Loader and Webpack Dev Server. To develop app with hot reload:
npm run dev
Now you can access the react application on http://localhost:8080
To make a production build of the project, run the following commands
npm run build
This will create create two files: index.js
in server/public/js
and server.js
in server/bin
.
server.js
will be used for serving the application on port 3002 and index.js
is the actual react app itself.
Run openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout key.pem -out cert.pem
to create a self-signed certificate for the HTTPS server.
Finally run
npm start
Then you will be able to access this app from http://localhost:3002.
To get a distributable tarball of your application, run this command
npm pack
Remember that you have to run npm run build
before doing this. This will create a tar.gz file in your root folder. The contents in this file is deployable. All you need to do is copy the contents inside package folder inside this tar.gz file to your server and run the app with something like pm2.