This is a single page application based on brewerydb.com api. LIVE DEMO ON AMAZON S3
- Run build and up:
docker-compose up
, then you are ready to usehttp://localhost:4210
if watchman is running out of resources trying to track all the files in a large ember app. To increase the fs.inotify.max_user_watches count to something that is more appropriate for an ember app, stop your docker-compose server by hitting ctrl-c (or docker-compose stop server if necessary) then execute the following command:
docker run --rm --privileged --entrypoint sysctl breweryupember_dev -w fs.inotify.max_user_watches=524288
your app folder is mounted to docker container so you can easily start developing.
Alternatively, if you are willing to run on your local machine just follow the steps below:
You will need the following things properly installed on your computer.
git clone git@github.com:mhadaily/breweryUp-Ember.git
this repositorycd breweryUp-ember
npm install
oryarn install
ember serve
- Visit your app at http://localhost:4200.
Make use of the many generators for code, try ember help generate
for more details
ember test
ember test --server
ember build
(development)ember build --environment production
(production)
This application has 3 environment for deployment
- Development
- Staging
- Production
simply run the following command:
AWS_ACCESS_KEY_ID=[yours] AWS_SECRET_ACCESS_KEY=[yours] ember deploy production --activate=true
you are able to deploy to S3 in Production environment. All build, revision, Gzip and other pipeline for deployment has been done and will be deployed automatically. ENJOY!
Answer from BreweryDB:
We don't currently support any type of AJAX calls or JSONP to the API for security reasons. You'd have to expose your API key to the public in your JS and that wouldn't be good. Steve's recommendation to proxy your AJAX calls through your server is the one we also suggest.
I have created what I need for my project through API Gateway and Lambda in AWS. Please visit my server repo
endpoints:
GET - https://2wb03ukih6.execute-api.us-west-1.amazonaws.com/v2/beers/{id}
GET - https://2wb03ukih6.execute-api.us-west-1.amazonaws.com/v2/beers/{id}/breweries
GET - https://2wb03ukih6.execute-api.us-west-1.amazonaws.com/v2/beers/{id}/breweries/{brid}
GET - https://2wb03ukih6.execute-api.us-west-1.amazonaws.com/v2/beers/{id}/events
GET - https://2wb03ukih6.execute-api.us-west-1.amazonaws.com/v2/beers/{id}/yeasts
GET - https://2wb03ukih6.execute-api.us-west-1.amazonaws.com/v2/beers/{id}/ingredients
GET - https://2wb03ukih6.execute-api.us-west-1.amazonaws.com/v2/beers
RESTSerializer
The serializer in Ember for Beers is only done which is I need to complete and demonstrate this project.
However, I still need to work on hasMany
and belongsTo
for other models.
Although I have partially done that, still need refinement until 100% ready.
For now, I will finish project with simple ajax request for other part as soon as it they need.