My background is that I’ve been mostly on JAVA and Vaadin stack for quite some time but have done work in the past with jQuery, prototype AJAX Apps. After doing some research, I’m planning to write my next app using Ember CLI, Ember-Data. Django and Django Rest Framework.
As far as my deployment is concerned, I would like to simplify and secure my deployment by having everything in 1 Django app, rather than having a static web ember app calling my django REST Services. For me this will simplify my deployment since all I have to do is deploy a django app and make it more secure because I can:
- Use Django Authentication to protect entry into the Ember App.
- Use Django CSRF Token Auth for protection.
- Use Django Authentication on my REST endpoints also.
- Use Django default REST framework protection to make sure that my back end services are being called from the same domain and not from elsewhere
That being the case, I seem to be having some trouble when I try either of the following:
- just copy the contents of the dist folder into my static folder for django and refer to those.
- Copy them as different django templates and include them in a main template.
I keep getting this error define is not defined
However, when I copy and paste these contents at the root of my apache2 web server, the app runs perfectly.
I would like to understand?
- What is the best way to deploy the output of an ember-CLI app inside of a django web app?
- Is there a better way to do what I’m trying to do and still get all the security benefits and simple deployment I’m trying to get? I find this deployment model simple because all I depend on is deploying a django app. I don’t have a situation where back end development is done and deployed by a different party than the front end development.
- In my case would it make sense for me to not use Ember CLI but just use Ember JS and do ember JS deployment inside of my Django app through django templates using the traditional way Ember is used as per the Ember JS videos?
I would appreciate any advice on the above questions.