Skip to content

Simple angular2 app with python-flask backend ( Learning Angular2 )

Notifications You must be signed in to change notification settings

dibanez/angular2-flask

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

angular2-flask

Simple angular2 app with python-flask backend (for learning angular2)

Usage

  1. backend directory contains the flask backend with simple authentication methods

  2. frontend directory contains the angular2 frontend as explained in angular-webpack-starter

Installation instructions

  1. Clone the repo

    git clone --depth 1 https://github.com/ansrivas/angular2-flask.git
    cd angular2-flask
  2. Install and run backend in a terminal

    • Server logs are stored in a directory named log_output
    cd backend
    sudo pip install -r requirements.txt
    python run.py
  3. Install frontend related dependencies

    • Easiest way to handle node related dependencies is to install nvm
    • Once you have node installed, install the project's dependencies
    cd front
    
    # install global dependencies
    npm install webpack-dev-server rimraf webpack typescript -g
    
    # install project related dependencies
    npm install
    
    # run server
    npm run server:dev:hmr
  4. Navigate to http://localhost:3000

  5. Default credential : admin:admin

Docker support:

  1. Build the docker backend
cd backend
docker build --no-cache  -t backend/python:latest .
docker run -it -p 8081:8081 --name server backend/python

To connect to the running container:

docker exec -it server /bin/sh
  1. Build the frontend
cd front
docker build --no-cache  -t frontend/angular2:latest .
docker run -it -p 3000:8080 --name angular2-app frontend/angular2
  1. Navigate to http://localhost:3000

  2. Easiest way to run this application to run docker-compose up in the project root directory.

About

Simple angular2 app with python-flask backend ( Learning Angular2 )

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 35.7%
  • TypeScript 22.0%
  • CSS 17.5%
  • HTML 15.3%
  • Python 9.5%