This is the base project for the yetu control center, containing server-side (scala-play framework based) and client-side (reactjs + reflux based) code.
If you want to make changes to this project, best is to install prerequisites and initialise the needed dependencies below:
You need to have the following installed in your system:
-
npm
- install from here
- check you have it by entering
npm
into a terminal
-
sbt (and a java JDK)
- on OSX:
brew install sbt
- every other platform: just execute
./activator
oractivator.bat
- it's a wrapper script around sbt that will download and install sbt for you if you don't yet have it, or otherwise start sbt.
- on OSX:
To run the project with a real integration with yetu OAuth system, you should grab application-local.conf
from private repo.
Copy the file to conf/application.conf
.
Note: This file is added to .gitignore. You should not be able to commit it, but please pay close attention to not leak the private settings.
Have a look at conf/application-example.conf
, copy to conf/application.conf
and request your own OAuth2 credentials, currently please contact [email protected] to obtain them.
For more information on how to develop yetu apps, please see this page
All the scripts are in the root directory.
- To run from the clean checkout (if you are starting for the first time or have just checked out a fresh master branch), you need to run the
clean_dev.sh
script:
./clean_dev.sh
- If you want to run the server in dev mode with all things watched:
./dev.sh
- Open your browser and point it to http://localhost:9000
This project has React Hot Loader integrated.
If you run the project using ./dev.sh
- everything will work out-of-box!
Otherwise, you can manually start hot-reload server using npm start
.
Note: You should have frontendBundlePath = "//local.yetudev.com:8899/assets/"
set in yetu
section of your conf/application.conf
.
Otherwise the hot-reloading will not work!
Four types of tests are currently executed:
can simply be run with play test
and have no further dependencies. They live under test
.
Are currently run with npm:
npm test
- Install fontcustom
- Run
npm run fonts
in project root
See fontcustom.yml
for configuration.
After you have added any library using npm
or bower
, you have to apply the next steps:
- Call
npm shrinkwrap
- it will freeze the versions of all sub-dependent node modules - Check in
bower_components
- all bower libraries should be in VCS