Node.js application using Django Admin Interface

2019-08-06 23:54发布

I would like to build a new application using node.js but it requires quite a bit of backend management that I would rather not have to build. I have some existing code in django and really like the built in Admin interface for handling the backend management.

Is it possible for me to use something like nginx to direct all traffic to my node.js application except when the url path starts with /admin in which case it would direct the traffic to django?

Alternatively is there something like the admin interface for any of the node.js frameworks for certain databases?

Thanks.

2条回答
forever°为你锁心
2楼-- · 2019-08-07 00:16

Yes, you can do that.

It might be easier to just put your django admin app on a subdomain, django.example.com.

I'm using Django admin interface with a legacy PHP application. I found out I could build a nicer admin in just a few hours, than the special built one. The frontend is still obviously using PHP and the old code, but I just swapped out the entire admin backend which is now run on django against the database.

It's very nice indeed.

查看更多
对你真心纯属浪费
3楼-- · 2019-08-07 00:19

If you are already using Node.js, you might want to look into node-http-proxy which can redirect requests to different places based on the route. It's very easy to setup and runs very fast from my experience.

查看更多
登录 后发表回答