Giter Site home page Giter Site logo

shorttompkins / benm Goto Github PK

View Code? Open in Web Editor NEW
170.0 15.0 87.0 10.31 MB

Boilerplate web app using Backbone.js, ExpressJS, node.js, MongoDB

Home Page: http://kroltech.com/2013/12/boilerplate-web-app-using-backbone-js-expressjs-node-js-mongodb/

JavaScript 99.38% CSS 0.62%

benm's Introduction

B.E.N.M Boilerplate

Backbone.js, ExpressJS & node.js, MongoDB

Build Status Dependency Status

This boilerplate app features a complete backend using node.js with ExpressJS, a data layer using MongoDB with Mongoose, and a complete front-end application built using Backbone.js (with Marionette and Browserify). The front-end application is a simple Contacts manager. All of the code is fairly basic yet functional.

A detailed blog post covering this entire application can be found here: http://kroltech.com/2013/12/boilerplate-web-app-using-backbone-js-expressjs-node-js-mongodb/

  • Backbone.js
  • Handlebars
  • Browserify
  • Jasmine tests
  • Basic UI app
  • Express / Node.js
  • Handlebars
  • Mocha test runner
  • Chai, Sinon, Proxyquire tests
  • MongoDB
  • Mongoose
  • Bower
  • package.json
  • Grunt:
  • Bower install
  • Browserify
  • Handlebars (precompiled)
  • jsHinting
  • LESS
  • Minification/Uglification
  • Karma client testing/tdd
  • Mocha node testing
  • Watchers
  • Concatenation/Copy
  • Concurrent runs (server, karma, mongod, etc)

Requirements

node 0.10+ (and npm), mongodb - visit nodejs.org and mongodb.com to download each.

$ sudo npm install -g grunt-cli
$ npm install
$ grunt init:dev

Grunt init:dev only needs to be run the first time to prepare the vendor.js files.

Running the App:

Start the server in DEV mode, with nodemon watching the app for a relaunch, watchers on scripts and less files for rebuild.

$ grunt server

Note: Windows users, for some reason the grunt shell task will not launch mongod during runtime (so the node server will crash). Be sure to launch mongod in another window before starting grunt server.

Front-end Tests/TDD:

Requires PhantomJS to be installed globally:

$ sudo npm install -g phantomjs

To run tests in TDD watch mode:

$ grunt tdd

To run tests once:

$ grunt test:client

Server Tests:

Server tests have been added using Mocha, Chai, and Proxyquire. To run the tests:

$ grunt test:server

Note:

$ grunt test

(will run all tests - both server and client)

benm's People

Contributors

shorttompkins 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

benm's Issues

Missing code?

Is it implied that I'm to add Updating and Deletion functionalities in this example? I'm not seeing the code in the repo, or the the options after it's being served locally in the views and templates...

BTW awesome guide!

Parse error in handlebars\base.js

Not sure if this code is too old to run now, but when I follow the instructions on a windows machine I get stopped at:

$ grunt server
Running "clean:dev" (clean) task Running "browserify:app" (browserify) task

C:\Users\user1\benm\node_modules\handlebars\lib\handlebars\base.js:1
module Utils from "./utils";
^
ParseError: Unexpected identifier
Warning: Error running grunt-browserify. Use --force to continue. Aborted due to warnings.

Problem with starting server

Hell what is the cause of this error when I try to run grunt server
grunt build:dev

Running "clean:dev" (clean) task

Running "browserify:app" (browserify) task
>> /home/muwo/webdevelopment/webdev/feknuuz/client/templates/add.hbs:1
>>     <div class="add_contact">
>>     ^
>> ParseError: Unexpected token <
Warning: Error running grunt-browserify. Use --force to continue.

Aborted due to warnings
```.

``

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.