Django Rest Framework and Angular App on same AWS Instance - django

I'm using Django Rest Framework for API service and Angular to use those APIs. How do I run Angular alongside Django Rest Framework on the EC2 instance using Amazon Elastic Beanstalk?
For example, Django Rest Framework serves up the API through http://test.com/api/v1/ and Angular makes HTTP requests to those API endpoints client-side.
What are the steps required to run Django Rest Framework API with an angular client side application on the same machine?
Any suggestions would be greatly appreciated!

It seems you are looking for a customized container that runs both a Python web app and an Angular app. The angular app accesses the django REST API on "localhost". I would recommend looking into creating a custom Docker container that lets you have this custom configuration.
You can read more on support of Docker containers on Elastic Beanstalk here.

While there may be simpler solutions out there I have been able to configure AngularJS + Django REST Framework to run on the same AWS instance. It's the accepted answer to this post https://stackoverflow.com/a/22852451/1759504
There I go into detail on exactly what I had to do to make it so my static AngularJS content runs from http://test.com/#/ while my APIs are at http://test.com/api/v1/

Related

What is the proper documentation for using django channels on azure app services?

I am trying to deploy a web app on azure app service
All the http request work just fine as one would expect
there just one problem none of the websockets work
I am using in memory channels version 2.4.0
and django version 2.2.15
The problem is azure just can not show me proper logs that django shows when running on local server
What is the proper documentation for using django channels on azure app services?
Django Channel
Refer Deploy Django app with App Service and Deploying a Basic Django App using Azure App Services
The problem is azure just can not show me proper logs that django shows when running on local server
Clicking “Show Logs” will show you the different processes happening behind the scenes
Refer Debug Django Web Application in Azure Web Apps

How to deploy a Django backend and Flutter frontend web app

I've been working on a web application that uses Django REST Framework and Django channels in the backend and has a Flutter frontend. It works successfully when tested locally, but my question was how would I deploy this:
What server is most appropriate for this application? (it should be free as this is just a personal project I've been testing)
Do I need to deploy the frontend and backend separately?
Are there any online resources I can refer to, to help me in this process?
Any help is appreciated :)
If you want to use it only for your personal use you could use https://www.heroku.com/free to host you backend.
You could use this guide
Yes, you should deploy them seperately.
Since in your specific case the django application is only used to hold the data, provide a REST API and sockets.

How Can i use Nuxt and Django for production at the same time?

I have a background in Django and a some experience in Vue. I have used Vue for almost a year now, but since I need an SSR I have to use Nuxt.However, I am still very confused with how to deploy it in the server along with Django. Should I deploy them in the same server or should I deploy them in a different server with Django server for API and Nuxt for the front end?
I have also used Vue alongside Django for a while in my project and I'm looking into Nuxt right now.
I'm planning to migrate my standard Vue codebase into a Nuxt project.
The thing that I'm looking to do is to deploy Nuxt as a server target: 'server' (which is the default) alongside Django in Docker containers.
The idea is to be able to start the application with a simple docker-compose up.
I'm not done yet but you could look at it.
Typically, your docker-compose file would have 3 service :
The Django backend (API)
The Nuxt frontend (which make calls to the backend API)
Nginx which would route the traffic to Django or Nuxt according to your needs
EDIT BELOW :
Meanwhile, I changed my mind and instead of having Nuxt running as a server, I only have 2 containers :
The Django backend (API)
Nginx which serves my built Vue frontend and routes the traffic accordingly

Can I deploy the Django Rest Framework project on Firebase?

We are developing an application using Vue.js and Django. The essence of the application: accept user requests from the form, send them for approval to the backend and send an answer to the frontend. On the localhost everything is already organized and working. Now our frontend is on firebase and I want to deploy my backend part somewhere. So, can I use firebase for deploying my part? Вecause I met different ambiguous answers to this question
You cant, I guess you are using Django Rest Framework with Vue.js. So you need deploy your back-end to some machine. You can choose any hosting which can propose you Linux machine. GoogleCloud, DigitalOcean, AWS, Heroku and a lot of others..
I like AWS (In your case as a new user you can run free EC2 for 12-month, if you do not need a lot of performance)

Deploy angular 8 and django rest framework

I have successfully deployed django rest framework backend and angular 8 frontend apps independently on Heroku. I'm clueless whether they should be deployed as separate apps or should be integrated on single instance. What is the best practice when it comes to DRF and SPA,particularly angular? If to be deployed as independent app,how can I configure DRF backend to respond to the frontend in another server. Any help would be appreciated. Thanks