Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rajathavalam/express-mvc-generator
Express' Model View Controller Application Generator.
https://github.com/rajathavalam/express-mvc-generator
database express-js express-mvc expressjs generator mongoose mvc-structure node node-js nodejs npm-module npm-package sass
Last synced: 2 months ago
JSON representation
Express' Model View Controller Application Generator.
- Host: GitHub
- URL: https://github.com/rajathavalam/express-mvc-generator
- Owner: rajathavalam
- License: mit
- Created: 2016-06-15T12:16:09.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-04-14T08:29:21.000Z (almost 4 years ago)
- Last Synced: 2024-10-29T23:14:54.886Z (3 months ago)
- Topics: database, express-js, express-mvc, expressjs, generator, mongoose, mvc-structure, node, node-js, nodejs, npm-module, npm-package, sass
- Language: JavaScript
- Homepage: https://github.com/rajathavalam/express-mvc-generator
- Size: 36.1 KB
- Stars: 42
- Watchers: 4
- Forks: 14
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
---
---### 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](https://i.cloudup.com/zfY6lL7eFa-3000x3000.png)](https://www.npmjs.com/package/express-mvc-generator/)
[Express'](https://www.npmjs.com/package/express-mvc-generator) Model View Controller Application Generator.
[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]## Installation
```sh
$ npm install express-mvc-generator -g
```
##Display the command options with the -h option:```bash
express -hUsage: 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 add stylesheet 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:
```bash
$ express myappcreate : 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.jsinstall dependencies:
$ cd myapp && npm installrun the app:
$ DEBUG=myapp:* node app or nodemon appcreate : myapp/app/models
create : myapp/app/models/home.js
create : myapp/lib
create : myapp/lib/email.js```
Install dependencies:
```bash
$ npm install
```###File Structure
```bash
$ express myappmyapp
|
|
|____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 98Run The express-mvc-generator Application
```bash
$ node app or nodemon app
``````sh
Demo URL'sSignup : 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 add stylesheet 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](LICENSE)
[npm-image]: https://img.shields.io/npm/v/express-mvc-generator.svg
[npm-url]: https://npmjs.org/package/express-mvc-generator
[downloads-image]: https://img.shields.io/npm/dm/express-mvc-generator.svg
[downloads-url]: https://npmjs.org/package/express-mvc-generator