# szm-delivery
The frontend-app for sz-magazin.

## Get started
- Have node.js version `>=7.2.0` installed
- Type `npm i` to install dependencies
- Type `npm run` to see possible commands
- Create `.env` with aws credentials
  - Run `npm run dev:work:elastic`
  - Create `sz-elastic-config.json` (duplicate of `szm-server/elastic-mappings/sz-magazin_v1.json`)
  - create index with `curl -s -XPUT "http://localhost:9200/sz-magazin" -T sz-elastic-conf.json`
- To start development run `npm run dev:work`
- To run the development and update modules, use `npm run dev`

## Tech-Stack
- node.js
- express.js
- handlebars
- sz-esc-nodejs
- webpack + babel
- mocha


## Elastic

### Starten
Folgendes ausführen: `docker-compose -p szm-elastic-delivery -f docker/elastic.yml up --build`

### Index anlegen
1. Config aus szm-server holen (szm-server/elastic-mappings/sz-magazin_v1.json) und in sz-elastic-conf.json ablegen
2. Folgendes ausführen `curl -s -XPUT "http://localhost:9200/sz-magazin" -T sz-elastic-conf.json`
