generator-angular-flask

所属分类:后台框架
开发工具:Python
文件大小:76KB
下载次数:0
上传日期:2015-05-26 22:22:24
上 传 者sh-1993
说明:  AngularJS+烧瓶用约曼发生器
(Yeoman generator for AngularJS + Flask)

文件列表:
.editorconfig (214, 2015-05-27)
.jshintrc (389, 2015-05-27)
.travis.yml (249, 2015-05-27)
LICENSE (1053, 2015-05-27)
app (0, 2015-05-27)
app\index.js (3524, 2015-05-27)
app\templates (0, 2015-05-27)
app\templates\Gruntfile.js (2489, 2015-05-27)
app\templates\_bower.json (425, 2015-05-27)
app\templates\_generator.json (26, 2015-05-27)
app\templates\_package.json (1188, 2015-05-27)
app\templates\app (0, 2015-05-27)
app\templates\app\___init__.py (394, 2015-05-27)
app\templates\app\models (0, 2015-05-27)
app\templates\app\models\___init__.py (0, 2015-05-27)
app\templates\app\routes (0, 2015-05-27)
app\templates\app\routes\___init__.py (0, 2015-05-27)
app\templates\app\routes\_index.py (95, 2015-05-27)
app\templates\app\static (0, 2015-05-27)
app\templates\app\static\_index.html (2380, 2015-05-27)
app\templates\app\static\css (0, 2015-05-27)
app\templates\app\static\css\app.css (75, 2015-05-27)
app\templates\app\static\js (0, 2015-05-27)
app\templates\app\static\js\_app.js (379, 2015-05-27)
app\templates\app\static\js\home (0, 2015-05-27)
app\templates\app\static\js\home\_home-controller.js (104, 2015-05-27)
app\templates\app\static\views (0, 2015-05-27)
app\templates\app\static\views\home (0, 2015-05-27)
app\templates\app\static\views\home\_home.html (521, 2015-05-27)
app\templates\bowerrc (64, 2015-05-27)
app\templates\config.py (202, 2015-05-27)
app\templates\db_create.py (493, 2015-05-27)
app\templates\db_downgrade.py (387, 2015-05-27)
app\templates\db_migrate.py (840, 2015-05-27)
app\templates\db_upgrade.py (309, 2015-05-27)
... ...

# The Angular-Flask generator A [Yeoman](http://yeoman.io) generator for [AngularJS](http://angularjs.org) and [Flask](http://flask.pocoo.org). Flask is a Python-based micro-framework. For AngularJS integration with other micro-frameworks, see https://github.com/rayokota/MicroFrameworkRosettaStone. ## Installation Install [Git](http://git-scm.com), [node.js](http://nodejs.org), and [Python 2.7](http://www.python.org/). The development mode also requires [SQLite](http://www.sqlite.org). Install Yeoman: npm install -g yo Install the Angular-Flask generator: npm install -g generator-angular-flask The above prerequisites can be installed to a VM using the [Angular-Flask provisioner](https://github.com/rayokota/provision-angular-flask). ## Creating a Flask service In a new directory, generate the service: yo angular-flask Install a virtual environment in new `flask` directory using `install.sh` (or `install.bat` for Windows): ./install.sh Run the service: flask/bin/python run.py Your service will run at [http://localhost:5000](http://localhost:5000). ## Creating a persistent entity Generate the entity: yo angular-flask:entity [myentity] You will be asked to specify attributes for the entity, where each attribute has the following: - a name - a type (String, Integer, Float, Boolean, Date, Enum) - for a String attribute, an optional minimum and maximum length - for a numeric attribute, an optional minimum and maximum value - for a Date attribute, an optional constraint to either past values or future values - for an Enum attribute, a list of enumerated values - whether the attribute is required Files that are regenerated will appear as conflicts. Allow the generator to overwrite these files as long as no custom changes have been made. Create the database as described in [this blog](http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-iv-database). flask/bin/python db_create.py Run the service: flask/bin/python run.py A client-side AngularJS application will now be available by running grunt server The Grunt server will run at [http://localhost:9000](http://localhost:9000). It will proxy REST requests to the Flask service running at [http://localhost:5000](http://localhost:5000). At this point you should be able to navigate to a page to manage your persistent entities. The Grunt server supports hot reloading of client-side HTML/CSS/Javascript file changes.

近期下载者

相关文件


收藏者