emg

express-mvc-generator

Express' Model View Controller Application Generator.

Showing:

Popularity

Downloads/wk

18

GitHub Stars

43

Maintenance

Last Commit

6mos ago

Contributors

0

Package

Dependencies

3

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Deprecated!
This project's version is no longer actively supported and not recommended for use. It is made available as read-only

Readme



Please check the official website for express application generator https://expressjs.com/en/starter/generator.html



Express Logo

Express' Model View Controller Application Generator.

NPM Version NPM Downloads

Installation

$ npm install express-mvc-generator -g 

##Display the command options with the -h option:

 express -h

  Usage: express [options] [dir]

  Options:

    -h, --help          output usage information
    -V, --version       output the version number
    -e, --ejs           add ejs engine support (defaults to EJS)
        --hbs           add handlebars engine support
    -H, --hogan         add hogan.js engine support
    -c, --css <engine>  add stylesheet <engine> support (less|stylus|compass|sass) (defaults to plain css)
        --git           add .gitignore
    -f, --force         force on non-empty directory

For example, the following creates an Express app named myapp in the current working directory:

express myapp:

$ express myapp


   create : myapp
   create : myapp/public/js/script.js
   create : myapp/package.json
   create : myapp/app.js
   create : myapp/public
   create : myapp/public/js
   create : myapp/public/img
   create : myapp/public/css
   create : myapp/public/css/style.css
   create : myapp/config
   create : myapp/config/routes.js
   create : myapp/config/constants.js
   create : myapp/config/database.js
   create : myapp/config/passport.js
   create : myapp/app/views
   create : myapp/app/views/login.ejs
   create : myapp/app/views/signup.ejs
   create : myapp/app/views/index.ejs
   create : myapp/app/views/index.ejs
   create : myapp/app/views/error.ejs
   create : myapp/app/views/404.html
   create : myapp/app/controllers
   create : myapp/app/controllers/home.js

   install dependencies:
     $ cd myapp && npm install

   run the app:
     $ DEBUG=myapp:* node app or nodemon app 

   create : myapp/app/models
   create : myapp/app/models/home.js
   create : myapp/lib
   create : myapp/lib/email.js

Install dependencies:

$ npm install

###File Structure

$ express myapp


myapp
|
|
|____app
|      |____controllers
|      |    |____home.js
|      |
|      |____models
|      |     |___home.js
|      |
|      |____views
|           |___404.ejs
|       |___error.ejs
|           |___index.ejs
|           |___login.ejs
|           |___signup.ejs
|   
|
|_____config
|     |___auth.js
|     |___constants.js
|     |___database.js
|     |___passport.js
|     |___routes.js
|
|
|____lib
|    |___email.js
|
|____node_modules
|
|
|____public.js
|    |____css
|    |    |__style.css
|    |    
|    |____js
|    |    |__script.js
|    |
|    |____img
|    |    |__img.jpg
|    |
|    |
|    |____uploads
|         |__img.jpg
|      
|   
|
|_____app.js
|
|
|
|_____package.json

###Important Settings 1) Open your config/database.js , Please configure your mongo db. 2) Open your config/constants.js , Please configure your constants(SMTP ....). 3) Do you want use SMTP ,Please uncomment passport.js line 95 to 98

Run The express-mvc-generator Application

$ node app or nodemon app 
Demo URL's

Signup : http://localhost:8042/signup
Login :  http://localhost:8042/login

Command Line Options

This generator can also be further configured with the following command line flags.

-h, --help          output usage information
-V, --version       output the version number
-e, --ejs           add ejs engine support (defaults to jade)
    --hbs           add handlebars engine support
    --jade          add jade engine support
-H, --hogan         add hogan.js engine support
-c, --css <engine>  add stylesheet <engine> support (less|stylus|compass|sass) (defaults to plain css)
    --git           add .gitignore
-f, --force         force on non-empty directory

Features

  • Very Good file structure MVC style Express.
  • Already We Given Examples of Controller and Model(Mongoose) , Passport and Config Settings
  • Pre Installed Important and Most Used NPM Packages , and used Example
  • We Given Simple And Well understanding Express MVC Example
  • We already included most used and important npm modules like as pm2 ,async, body-parse, sessions, flash, cookie, dateformat, mongoose, nodemailer , nodemon, passport
  • Support View engines:
    • Jade
    • Handlebars
    • Swig
    • EJS
    • Marko
    • Nunjucks
  • Supported CSS pre-processors
    • SASS (both node-sass and ruby sass)
    • LESS
    • Stylus
  • Supported Databases (with MVC structure):
  • MongoDB
  • MySQL
  • PostgreSQL
  • RethinkDB
  • SQLite

Help/Assistance

Email Us : rajaram.tavalam@gmail.com

License

MIT

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial