The JavaScript client for openstax Tutor.
- install nodejs from the website or using http://brew.sh if you’re already using it
npm install -g gulp bower
to install gulp and bower globallygit clone https://github.com/openstax/tutor-js
to the directory of your choice
- If you don’t have
git
installed you can install homebrew and thenbrew install git
cd tutor-js
npm install
bower install
gulp serve
- Point your browser to http://localhost:8000 to use the mock data in
/api
gulp test
runs unit testsgulp prod
builds minified files for productiongulp serve
builds files and starts up a static webservergulp dev
watches and rebuilds CSS and JS files and starts webservergulp tdd
does whatdev
does plus reruns unit tests
Use PORT=8000 gulp serve
to change the default webserver port.
After local updates are made:
- stop
gulp serve
npm install
- if
bower.json
changed,bower install
- restart
gulp serve
Before starting up vagrant, you can debug using a more production-like config by:
gulp prod
- unzip
/dist/archive.tar.gz
into anassets/
directory - serve the
assets/
directory via NGINX or something with CORS enabled - update the paths in
tutor-server/conf/secrets.yml
to point tohttp://localhost:[NGINX-PORT]/assets/tutor.min-####.css
andtutor.min-####.js
respectively - in
tutor-server
runrails s
- go to http://localhost:3001