Angular JS front end with REST api powered by Spray. Typesafe Activator template created by Credera
Front end requires Bower, which requires npm
But this is an scala app and I already have SBT!! For the front end dependency management you will need npm.
Options
- https://www.npmjs.org/doc/README.html
brew install npm
Bower is a front end dependency manager npm install -g bower
(Linux users might have to run with sudo)
Download all the front end dependencies with bower install
They will be in your app\bower_components
directory as instructed by .bowerrc
Grunt is a front end task runner
npm install -g grunt-cli
Wire up the dependencies with grunt bowerInstall
This modifies app\index.html
to include your dependencies
Start sbt with sbt
Start the container with ~container:start
(the ~
tells sbt to reload when any files change)
Navigate to the home page http://localhost:8080/index.html to see the Angular app
Or do a GET request to http://localhost:8080/api/person to hit the REST endpoint directly