Yeoman express stack
- Transfer
Note perev .: instead of short news, https://plus.google.com/115133653231679625609/posts/YDNbxVxi4er decided to transfer the dock on this fork.
Express the Stack Yeoman - this fork Yeoman ( approx .: pens. Article Habré ).
Fork was created to prove the ability to develop a full stack (client-server) using Yeoman 0.9.6, Express and AngularJS. Note: this is an experimental branch and (for now) is only suitable for testing and running the concept.
Includes:
- Specialized version of Yeoman server.js with support for Express Middleware
- Out of the box LiveReload supported
- Generator for Express and CRUD — Generator for AngularJS
It is assumed that you will have the code of both the client and server parts of the application in one directory. After installation, you can see the structure of the built-in test application: a directory
server
for the server side of the application and a directory app
for the client side.Components
yeoman-custom
- Special build Yeoman 0.9.6 with support for Express-middlewaregenerators
- Generators for Express and AngularJS (CRUD)demo
- example application
Installation (assuming Yeoman@0.9.6 is already installed)
Clone Repository
git clone git://github.com/yeoman/yeoman.git
cd yeoman
git checkout express-stack
Set Yeoman@0.9.6 and Grunt
npm install -g yeoman
npm install -g grunt
Then from the directory
express-stack
execute:npm install
grunt install
- follow the prompts from step 2 and update the system paths
- now a new command is available to you
yeomen
(noticed e instead of a in the wordyeoman
? - e means express ); this command can run a separate copy of yeoman to use the new generators listed below
Let's start
After the installation process is complete, you have two options: you can start a new application using the commands listed below, or go to the demo, which already has a small sample code so that you can try the finished project.
yeomen init angularcrud # Обычное приложение Angular
yeomen init angularcrud:crud post # Angular CRUD routes/views
yeomen init express post # Express CRUD
yeomen server
# теперь можно перейти по ссылке #/api/post/index чтобы проверить
# что маршрутизация корректно работает с Express
Note: if errors are reported that Express is not installed, execute
npm install express
.Demo
Now you can go to the demo directory and run the command
yeomen server
to launch this application. If you have several versions of yeoman installed locally, you can use it yeoman-custom
directly, but in general it should work like that. And finally, generators. The following are supported:
Angularcrud:
angularcrud:all
angularcrud:app
angularcrud:common
angularcrud:controller
angularcrud:crud
angularcrud:crud-controller
angularcrud:crud-route
angularcrud:crud-view
angularcrud:directive
angularcrud:filter
angularcrud:route
angularcrud:service
angularcrud:view
Express:
express:all
express:crud
You can read more about each in USAGE .
The authors
@addyosmani, @blai, @jacobmumm, @mklabs
Note. perev.
An opinion on how convenient it is to use Yeoman for developing applications on AngularJS can be compiled by video (the video is long but interesting; the process of creating a simple store is shown):
( watch from 13:40 )
http://youtu.be/XOmwZopzcTA?t=13m40s .
Just in case, I emphasize that the video uses the usual build of Yeoman, and only the client part is developed.