Popeye; The Express Generator
A yeoman generator for express.js
Installation
First, install Yeoman and generator-popeye using npm (we assume you have pre-installed node.js).
npm install -g yonpm install -g generator-popeye
Then generate your new project by providing a name:
yo popeye coolestapp
You will be asked to provide a mongodb connection URL along the way.
Generate your modules whenever you need:
yo popeye:module coolest
Folder structure
Based on above command serquece, popeye will generate the following folder structure for your next exciting project.
|-- coolestapp/
|---- app/
|------ modules/
|-------- root-module/
|---------- root-controller.js
|---------- root-model.js
|---------- root-service.js
|-------- coolest-module/
|---------- coolest-controller.js
|---------- coolest-model.js
|---------- coolest-service.js
|---- node_modules/
|---- index.js
|---- package.json
|---- routes.js
Note that Popeye will edit the route.js file to include newly added modules like below,
var coolestController = require('./app/modules/coolest-module/coolest-controller');
router.use('/coolest', coolestController);
Getting To Know Yeoman
- Yeoman has a heart of gold.
- Yeoman is a person with feelings and opinions, but is very easy to work with.
- Yeoman can be too opinionated at times but is easily convinced not to be.
- Feel free to learn more about Yeoman.
License
MIT © isurusiri