当前位置: 首页 > 软件库 > Web应用开发 > >

express-mvc-boilerplate

授权协议 MIT License
开发语言 JavaScript
所属分类 Web应用开发
软件类型 开源软件
地区 不详
投 递 者 殳凯捷
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Express MVC Boilerplate

A simple mvc boilerplate for express.js (gulp + expressjs + nodemon + browser-sync)

Related modules

  • express - web application framework for node
  • pug - template engine
  • stylus - pre-processor CSS
  • mongoose - nodejs orm for mongodb
  • bower - a package manager for the web
  • gulp - automate workflow

Prerequisites

  • Node.js http://nodejs.org
  • MongoDB brew install mongodb

Project Structure

.
├── app/
│   └── controllers           # contains controller files
│   └── models                # contains model files
│   └── views                 # contains express view (pug) files
│   └── routes.js             # routes config file
├── config/
│   ├── index.js              # environment config file
│   └── db.js                 # db config
├── public/                   # contains static assets
│   ├── components            # bower components folder
│   │   └── ...
│   ├── favicon               # favicon folder
│   ├── fonts                 # contains font files
│   ├── css                   # all files will generate from gulp
│   ├── styl                  # contains style sheets (stylus)
│   ├── js                    # contains js files
│   └── img                   # contains image files
├── test/
│   └── spec.js               # unit & func tests
├── .bowerrc                  # bower config
├── .bower.json               # bower dependencies
├── .Procfile                 # process file for heroku implementation
├── .gitignore                # specifies intentionally untracked files to ignore
├── .editorconfig.js          # editor config
├── .gulpfile.js              # gulp config
├── .eslintrc.yml             # eslint config
├── .eslintignore             # eslint ignore specific files and directories config file
├── .travis.yml               # travis ci config
├── app.js                    # app setup file
└── package.json              # build scripts and dependencies

Getting Started

The easiest way to get started is to clone the repository:

# Get the latest snapshot
$ git clone https://github.com/oguzhanoya/express-mvc-boilerplate.git myproject
$ cd myproject

# Install dependencies
$ npm install
$ bower install

$ node app.js

Development

npm run dev

Your app should now be running on localhost:7000.

Test

npm test

Lint

npm run lint

Docker Support

  • Docker https://docs.docker.com/engine/installation/
# Build the project
docker-compose build  

# Start the application
docker-compose up

Deploy

Make sure you have the Heroku Toolbelt installed.

heroku create
git push heroku master
heroku open

License

MIT

 相关资料
  • null 我注意到了一件事,我不知道这是不是一个问题: 未找到引用的文件'lib/jquery-validation/jquery.validate.js'。 我和rawcap有个垃圾场,但我没注意到里面有什么。那里有一些东西: 删除ApplicationHost.config(并更改端口号) 以管理员身份运行visual studio 删除文档中的IISExpress文件夹(更改错误消息,直到重

  • 快递概述 Express是一个最小且灵活的Node.js Web应用程序框架,它提供了一组强大的功能来开发Web和移动应用程序。 它有助于基于节点的Web应用程序的快速开发。 以下是Express框架的一些核心功能 - 允许设置中间件以响应HTTP请求。 定义路由表,该表用于基于HTTP方法和URL执行不同的操作。 允许基于将参数传递给模板来动态呈现HTML页面。 安装Express 首先,使用N

  • Express Boilerplate ExpressJS boilerplate with Socket.IO, Mongoose for scalable projects. Includes ExpressJS NodeJS Mongoose Socket.io Nodemon API-Docs Getting Started These instructions will get you

  • art-template for express. Install npm install --save art-template npm install --save express-art-template Example var express = require('express'); var app = express(); app.engine('art', require('exp

  • Serverless Express ⎯⎯⎯ This Serverless Framework Component enables you to take existing Express.js apps and deploy them onto cheap, auto-scaling, serverless infrastructure on AWS (specifically AWS HTT

  • 我试图使用express中间件处理错误,在这些行中,我有以下错误 user.js控制器 使用者js模型 app.js 错误 (节点:3304)未经处理的PromisejectionWarning:错误[ERR_HTTP_HEADERS_SENT]:发送到客户端后无法设置头。。。 (节点:3304)UnhandledPromiseRejtionWarning:未处理的promise拒绝。这个错误要么