django-rest-angular2-exampleA simple example of a Django REST app + Angular2

联合创作 · 2023-09-21 07:19

Angular 2 and Django REST Framework

A simple example application where an Angular 2 app talks to an API running Django REST framework.

Setup

Install dependencies and run migrations to set up the app:

  • Create a virtualenv
  • Run ./build-app.sh

Note: if you are unsure of how to build a virtualenv, uncomment the lines in the install script that will do it for you.

Run the app

Run the REST server:

# in the exampleapp folder
python manage.py runserver

Start the Angular 2 app:

# in the angular2 folder
npm start
浏览 6
点赞
评论
收藏
分享

手机扫一扫分享

编辑
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑
举报