Sample Flask with Angular web app.
/
├── LICENSE.md
├── README.md
├── requirements.txt
└── sample-flask-angular # Flask project folder
├── angular # Angular project folder
│ ├── dist
│ ├── e2e
│ ├── karma.conf.js
│ ├── node_modules
│ ├── package.json
│ ├── protractor.conf.js
│ ├── README.md
│ ├── src
│ ├── tsconfig.json
│ └── tslint.json
└── main.py
Install the following requisites:
- Python3
- Virtualenv
- NodeJs
- Angular-cli
Create virtual enviroment folder and load:
$ virtualenv -p python3 .venv
$ source .venv/bin/activateInstall python dependencies:
(.venv) $ pip install -r requirements.txt
Install angular dependencies:
$ cd sample-flask-angular/angular
$ npm installFirst build production application of Angular with Angular-cli:
$ cd sample-flask-angular
$ ng build --prodStart server:
$ source .venv/bin/activate
(.venv) $ python sample-flask-angular/main.py/: Index route will serve angular application./hello: return Flaskhellofunction.
- Ismael Taboada: profile