Simple project to quickly start developing a web application using AngularJS and Spring boot. This configuration uses gradle and webpack.
- java >= 1.8
- nodejs >= 5.0 (need ES2015 support)
Backend:
- Gradle
- Spring boot
- Spock test framework
Frontend:
- Webpack
- AngularJS 1.x
- Karma/Jasmine unit tests
Frontend was copied from webpack-angular-es6
./gradlew build
This should invoke for you npm install
and get frontend dependencies.
You interact with app on this address:
http://localhost:9090/
It's a webpack dev server which proxies requests to backend.
If you go to localhost:8080
will be served static files from backend/src/main/resource/public
so no changes in frontend dir will affect your ui.
-
backend:
./gradlew bootRun
or from ide:
run WebsiteApplication
When working with intelij IDEA you need to compile after each change to make auto-reload work :( Automatic restart
-
frontend: with
cd frontend
npm start
This command starts webpack that is hotreloading and proxies all calls to
/api/*
to backend
This command will build fat-jar:
./gradlew build
Start your distribution:
java -jar backend/build/libs/gHipster-0.1.0.jar