Installation notes:
- adjust
configuration.exampleas instructed in the file and rename it toconfiguration.json - install Maven and build the project using
mvn clean package - copy
cordonbleu-main-0.0.1-SNAPSHOT.jarfromcordonbleu-main/targetinto this folder - install MongoDB
- run
run.sh - view
http://localhost:8080/ - register as a new user
- give yourself admin permissions:
- log into MongoDB
use cordonbleudb.user.find().pretty()and note the_idof your userdb.user.update({ _id: "[INSERT ID HERE]" }, { $set: { flags: ["ADMIN"] } })inserting the_idfrom the previous step
Development notes:
- install node + npm
cdtocordonbleu-mainnpm installnpm install webpack -gwebpack --watchwill auto-compile everything undersrc/main/resources/webpackand bundle it intotarget/classes/static/js/bundle.jswhich is referenced inindex.html- start the
CordonBleuApplicationdropwizard server usingserver src/test/resources/config-test.jsonas arguments
Now you can develop, all changes in src/main/resources/webpack will be bundled automatically upon file-save. CordonBleuApplication needs to be restarted if backend changes are made though.
SASS features used:
- Variables: Declare using
$var: 123px;just like you would usually declare a CSS property. - Calculations: Combined with variables, you can calculate CSS properties, e.g.
top: $navbarHeight + 3px;.
ES6 features used:
- Arrow functions: Same semantics as in Java just with
=>instead of->. Thethisvariable is not affected in contrast tofunctions and keeps its scope, which is very handy in most scenarios.- Just like in Java, singular expressions don't need to be wrapped by
{}andreturncan be omitted. If you want to return an object as a singular expression, wrap it with().
- Just like in Java, singular expressions don't need to be wrapped by
- Spread operator
...arrayto expand an array into the arguments of a function.
ES6 features that sound useful (but haven't been used yet):
- Using
constandletinstead ofvar. - Appending
,to the last element of an array or object. It's allowed by ES6 and is easier to refactor this way. - Using backticks ``` to reference variables within strings. Quit using
+for string concatenation. - Default parameter values.
- Code Style guidelines for ES6 with some interesting ideas: https://github.com/elierotenberg/coding-styles/blob/master/es6.md