F
F
Fires2017-01-03 21:11:00
Django
Fires, 2017-01-03 21:11:00

How to properly deploy angular2 + django?

I'm trying to deploy to the server (nginx or azure, I haven't decided yet)
Angular2 is assembled by the command ng build --prod, after which I get a set of files in the dist folder. Everything seems to be fine here.
But I have no idea how to deploy django rest and attach it to angular2 .. I would be very grateful for help in understanding!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Макс, 2017-01-03
@Fires

Этот набор файлов отдавай статически, через nginx. А для Django выдели отдельный эндпоинт, например /api/. В него ангуляровое приложение будет ходить за данными.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question