Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to use Django and Node.Js?

Tags:

node.js

django

I have a django backend set up for user-logins and user-management, along with my entire set of templates which are used by visitors to the site to display html files. However, I am trying to add real-time functionality to my site and I found a perfect library within Node.Js that allows two users to type in a text box and have the text appear on both their screens. Is it possible to merge the two backends?

like image 800
user1835351 Avatar asked Dec 10 '12 05:12

user1835351


People also ask

Can I use Node JS packages with Django?

Can I use the Node.js packages along with Django? No. Django is a Python framework and thus runs in a Python interpreter. That interpreter cannot run node.js modules because those are Javascript and rely on the node.js Javascript engine. If you want to compare things: Node.js is a Javascript programming environment.

Is it possible to use Node JS as a server?

While you'd need two different environments to use nodejs as a server along with django as a server, node.js has a critical role in managing packages for client Javascript in modern web development. As an example, tools like Webpack will bundle a series of Javascript modules for a client.

Is Django or NodeJS better for backend development?

Which one is best for you will depend on a few specific factors. Whilst both Django and Node.js are solid choices for backend development, their different attributes mean that one might be better suited to your project than the other. 1. The architecture Let’s get technical for a minute.

What is the use of Django framework?

Django is an open-source Python-based web framework, based on the working principle of not repeating the work, i.e. it helps developers build applications quickly. Django has its place cemented among the top Python frameworks used to create web applications and websites.


1 Answers

You can't merge them. You can send messages from Django to Node.Js through some queue system like Reddis.

like image 94
sneawo Avatar answered Oct 08 '22 11:10

sneawo