Skip to content

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

License

ansrivas/angular2-flask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

angular2-flask


Backend DockerPulls

Frontend DockerPulls

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

Info


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

  2. front directory contains the angular2 frontend based on angular-webpack-starter

Usage


  1. Clone the repo

    git clone --depth 1 https://github.com/ansrivas/angular2-flask.git cd angular2-flask
  2. Install the backend related requirements and run. The following will start a flask-server on localhost:8080

    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. Now navigate to http://localhost:3000 and login using default credential : admin:admin

  5. Extra Note: To create a production build

    cd front npm install webpack-dev-server rimraf webpack typescript -g npm install npm run build:prod

Docker support:


The current build is using nginx to serve static files. The pre-requisite is to run the following commands and then use docker-compose

  1. In project root directory execute docker-compose up

  2. Navigate to http://localhost:3000 and login using admin:admin

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 7