• Stars
    star
    273
  • Rank 150,780 (Top 3 %)
  • Language
    JavaScript
  • Created over 13 years ago
  • Updated almost 10 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Application template for a structured Node.js, Express, [Sequelizer in devel, Mongoose in master/Mongoose Branch], EJS & JQuery Application

THIS PROJECT IS NO LONGER MAINTAINED, TRY THIS ONE: https://github.com/niftylettuce/eskimo

Express MVC Bootstrap

A MVC boilerplate for Express.js

Description

I built this application to create a template MVC style app that I could then use as the start point for further development. I used the excellent examples in the main Express github repository, specifically the MVC example, as the starting point. I have however changed it quite substantially to make it clearer and remove some of the magic that confused me at first when learning. If you are familiar with other MVC frameworks hopefully my file structure makes some sense.

Requires

You need to manually install:

  • Node.js: Amazing javascript asynchronous IO library, install manually.
  • MongoDB: NoSQL Database, install manually.
  • NPM: Node package manager, used to install the remaining.

And then install via NPM:

  • Express: Application Framework for Node.js
  • Mongoose: Node.JS ORM for Mongo
  • ejs: EmbeddedJS Templating
  • cluster: extensible multi-core server manager
  • log: Tiny logger with streaming reader
  • connect: High performance middleware framework
  • mime: A comprehensive library for mime-type mapping
  • qs: querystring parser
  • expresso: TDD framework, light-weight, fast, CI-friendly
  • should: test framework agnostic BDD-style assertions
  • socket.io: The cross-browser WebSocket

But I've included in this project:

Installation

  • Install node.js
  // on osx with brew
  brew update
  brew install node

  // build from source
  git clone git://github.com/joyent/node.git
  ./configure
  make
  make install
  • Ininstall mongodb
  // on osx with brew
  brew update
  brew install mongodb

  // create db folder
  mkdir -p /usr/local/db/

For more installation detail please see this

  • Install npm
curl http://npmjs.org/install.sh | clean=no sh
  • Install required packages
  // install executable package globally
  npm install express-mvc-bootstrap -g

  // make project folder and go to that folder
  mkdir /path/to/project
  cd /path/to/project

  // install packages locally to be `require();`
  npm install socket.io should mongoose log cluster expresso qs mime ejs connect express express-mvc-bootstrap

Setup

  • In you project folder run
  // create app 
  eb create-app

  // running mongodb
  mongod --dbpath /usr/local/db/

  // running server
  eb

Commands:

  // Shows help
  eb script

  // Wrapper for 3 commands below
  eb script generate-all HelloWorld

  // Creates a model
  eb script create-model HelloWorld 

  // Creates a controller
  eb script create-controller HelloWorld

  // Creates views
  eb script create-view HelloWorld

  // Creates tests
  eb script create-test HelloWorld

  // Runs server on different port
  eb server server.port=3000

  // Creates a new app
  eb create-app

TODO:

Build some amazing apps!

More Repositories

1

calipso

Calipso is a simple NodeJS content management system based on Express, Connect & Mongoose.
JavaScript
1,705
star
2

calipso-site-theme

The theme used on the Calipso home page.
JavaScript
9
star
3

drupal_behat

BDD for Drupal
PHP
7
star
4

npm-users

Simple token based user account reset server for NPM.
JavaScript
5
star
5

seguir-example-application

Fully functional example app that uses the seguir social backend.
HTML
5
star
6

li3_drupal

Drupal 7 Module that integrates the Lithium MVC Framework. Why? Because of it's very strict namespacing, you can include it without any overlaps (you can't with Cake or Kohana). Accelerates building of non-content, complex apps.
PHP
4
star
7

composite-js

Javascript Composite Application Framework
JavaScript
4
star
8

eu-cookie

Very simple implementation of a cookie popup notice, configurable re. position and content, includes frequency capping.
JavaScript
3
star
9

KanbanPlan

Simple planning tool based on Gaelyk, Google App Engine and jQuery.
JavaScript
3
star
10

travelog

Travel planner and blog, with google maps and picassa integration.
PHP
3
star
11

calipso-repo

Repository module for calip.so
JavaScript
2
star
12

calipso-gallery-theme

Gallery theme for Calipso, used for photo blogs.
JavaScript
2
star
13

skelipso

Calipso site theme based on skeleton CSS framework
JavaScript
2
star
14

drupal-apps

Drupal Apps SDK
JavaScript
2
star
15

logging-response-node

Showing some basics
JavaScript
1
star
16

poplar-farm

JavaScript
1
star
17

ngmol

JavaScript
1
star
18

repo

JavaScript
1
star
19

gollum-wiki

Test of a gollum wiki.
1
star
20

composed

Example of traditional page composition options.
JavaScript
1
star
21

calipso-elastic

Elastic Search Module for Calipso - this is replicated in core, using this to test the module find, download, install process.
JavaScript
1
star
22

masiva

TBD
Groovy
1
star
23

seguir-express-middleware

Middleware for Express that quickly adds a set of endpoints for building social features into your app.
JavaScript
1
star
24

bosco-alt

Bosco returns (perhaps a bit simpler)
JavaScript
1
star