Giter Site home page Giter Site logo

rajathavalam / express-mvc-generator Goto Github PK

View Code? Open in Web Editor NEW
42.0 4.0 12.0 37 KB

Express' Model View Controller Application Generator.

Home Page: https://github.com/rajathavalam/express-mvc-generator

License: MIT License

JavaScript 55.40% HTML 25.66% CSS 4.43% Less 4.43% Sass 0.12% SCSS 4.46% Stylus 4.42% EJS 0.37% Handlebars 0.36% Pug 0.34%
express-mvc mvc-structure mongoose sass database generator expressjs express-js nodejs node-js

express-mvc-generator's Introduction



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

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 : [email protected]

License

MIT

express-mvc-generator's People

Contributors

rajaramtt avatar rajathavalam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

express-mvc-generator's Issues

it doesn't start when i send npm express-mvc-generator

this is output when i send the command on terminal

npm WARN saveError ENOENT: no such file or directory, open '/Users/xyz/workspace-nodejs/prova/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/Users/gaetano/workspace-nodejs/roveeeeeee/package.json'
npm WARN prova No description
npm WARN prova No repository field.
npm WARN prova No README data
npm WARN prova No license field.

can u help me?!

Command line option "handlebars" engine support is not working

I tried to create an application with the following options:
$ express --hbs --git myapp

And it's giving me the errors below:

` create : myapp
create : myapp/public/js/script.js
create : myapp/package.json
create : myapp/app.js
create : myapp/.gitignore
create : myapp/public
create : myapp/public/js
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/config/auth.js
create : myapp/public/img
create : myapp/lib
create : myapp/lib/email.js
create : myapp/public/css
create : myapp/public/css/style.css
create : myapp/app/views
create : myapp/app/views/index.hbs
create : myapp/app/views/layout.hbs
create : myapp/app/views/error.hbs
fs.js:667
return binding.open(pathModule.toNamespacedPath(path),
^

Error: ENOENT: no such file or directory, open 'D:\Users\dcarpioc\AppData\Roaming\npm\node_modules\express-mvc-generator\templates\common\login.ejs'
at Object.fs.openSync (fs.js:667:18)
at Object.fs.readFileSync (fs.js:572:33)
at copy_template (D:\Users\dcarpioc\AppData\Roaming\npm\node_modules\express-mvc-generator\bin\express:340:16)
at D:\Users\dcarpioc\AppData\Roaming\npm\node_modules\express-mvc-generator\bin\express:191:11
at D:\Users\dcarpioc\AppData\Roaming\npm\node_modules\express-mvc-generator\bin\express:459:11
at D:\Users\dcarpioc\AppData\Roaming\npm\node_modules\express-mvc-generator\node_modules\mkdirp\index.js:30:20
at FSReqWrap.oncomplete (fs.js:153:20)`

Please anyone can help?

not working

when i run express, just read => env: node\r: No such file or directory. in osx sierra

It is Supporting Mongo Mongoose only ?

No We are Integrated Mongoose and MYSQL ,But we given model example using mongoose ,If you want you can use any node supporting database .

We are updating installing options like Database ,Extra Modules etc....

follow the steps as you said, I got errors

npm WARN deprecated [email protected]: Critical security bugs fixed in 2.5.5
npm WARN deprecated [email protected]: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN deprecated [email protected]: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN deprecated [email protected]: This project is unmaintained
npm WARN deprecated [email protected]: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm WARN deprecated [email protected]: This project is unmaintained
npm WARN deprecated [email protected]: This project is unmaintained
npm WARN deprecated [email protected]: This project is unmaintained
npm ERR! code ERR_STREAM_WRITE_AFTER_END
npm ERR! write after end

Is this out of date?

I am looking forward to a very well defined MVC demo for nodejs, especially express framework. I found your lib and exciting, however I failed to install it.

DO NOT USE THIS!

This script tries to replace the default express cli with its own!

As it sits, THIS IS A MALWARE!!!

Error when creating new app

Hi. I'm getting the following error when use "express myapp".
/usr/local/lib/node_modules/express-mvc-generator/bin/express:456
mkdirp(path, 0755, function(err){
^

TypeError: mkdirp is not a function
at mkdir (/usr/local/lib/node_modules/express-mvc-generator/bin/express:456:3)
at createApplication (/usr/local/lib/node_modules/express-mvc-generator/bin/express:121:3)
at /usr/local/lib/node_modules/express-mvc-generator/bin/express:421:7
at /usr/local/lib/node_modules/express-mvc-generator/bin/express:353:5
at FSReqCallback.oncomplete (fs.js:165:23)

Any idea how to fix this? Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.