Code Monkey home page Code Monkey logo

techtonic's Introduction

#techtonic

Tools and templates to build JavaScript applications faster and better

##Getting Started Join the chat at https://gitter.im/jhwohlgemuth/mvc-webappย Bitdeli Badge

    git clone https://github.com/jhwohlgemuth/mvc-webapp.git
  • Navigate to the root directory
    cd mvc-webapp
  • Install the node modules needed for development
    npm install

##Technologies

Task Tool
dependency loading RequireJS
models/collections Backbone.js
views MarionetteJS
templates Handlebars.js
task runner Grunt
transpile CSS grunt-contrib-less
pre-compile templates grunt-contrib-handlebars
optimize JS grunt-contrib-requirejs
test runner Karma with PhantomJS
test framework Jasmine and Sinon.JS
code coverage Istanbul (using Karma)
code quality JSHint, JSCS, and JSInspect
code metrics Plato
documentation JSDocs

##Folder Structure Dependency Status +- api | |- db.json | - index.js +- app | +- models | +- views | +- controllers | +- modules | +- helpers | |- app.js | |- router.js | |- main.js | |- config.js | - index.html +- assets | +- fonts | +- images | +- library | +- templates | +- less | |- reset.less | - style.less +- config | |- .csslintrc | |- .jscsrc | |- .jscsrc-jsdoc | |- .jshintrc | |- default.js | - karma.conf.js +- tasks | - main.js +- tests | +- data | +- jasmine | +- specs | - test-main.js +- vault +- web | - server.js |- GruntFile.js |- package.json |- app.json |- server.js - Vagrantfile

##Grunt Tasks

  • grunt lint
  • grunt linting (watch task)
  • grunt build (transpile LESS, pre-compile templates and optimize JS into one file)
  • grunt test
  • grunt testing (watch task)
  • grunt cover
  • grunt covering (watch task)
  • grunt review (watch task)
  • grunt quick-review (watch task) [default task]
  • grunt inspect (detect copy-pasted and structurally similar code)
  • grunt aria (lint HTML files for accessibility)
  • grunt docs (generate documentation in ./docs folder)
  • grunt plato (generate plato report in ./reports folder)
  • Read tasks/main.js for all available tasks

##JSCS Rules (JSHint rules)ย Codacy Badge

##RESTful API Server

  1. Open new command prompt in /api directory.
  2. Type:
    json-server --watch db.json

๐Ÿ˜„ You now have a RESTful API for testing at localhost:3000. (see docs for more information)

##WebSocket Server Endpoint

  1. Open new command prompt in root directory.
  2. Type:
    node api/index

๐Ÿ˜„ You now have a WebSocket server for testing at localhost:13337. (see docs for more information)

#Data Services ย MongoDB ย redis ย CouchDB

###Requirements

  • Node.js is installed
  • Virtualbox is installed
  • Vagrant is installed
  • vagrant hostmanager plugin is installed vagrant plugin install vagrant-hostmanager

###Using MongoDB

โœ“ Set inline to $install_mongo on line 27.

โœ“ Execute vagrant up

โœ“ Install Mongo for windows

โœ“ In a mongo console, execute mongo db.server

Tip: The default port for MongoDB is 27017. It can be changed by editing /etc/mongod.conf.

###Using redis

โœ“ Set inline to $install_redis on line 27.

โœ“ Execute vagrant up

โœ“ Install a redis client. I like Redis Commander.

Install Redis Commander with npm install redis-commander --global

โœ“ Start Redis Commander with redis-commander --redis-host db.server

โœ“ Open your favorite browser and navigate to localhost:8081

Tip The default port for redis is 6379. It can be changed by editing /etc/redis/redis.conf.

###Using CouchDB โœ“ Set inline to $install_couch on line 27.

โœ“ Execute vagrant up

โœ“ Create a ssh tunnel on your host machine (input yes, then vagrant):

ssh -f -L localhost:5984:127.0.0.1:5984 [email protected] -N

โœ“ Open your favorite browser and navigate to localhost:5984/_utils

Tip: The default port for CouchDB is 5984. It can be changed by editing /etc/couchdb/local.ini

#Alternatives

#References & Resources

#Future

techtonic's People

Contributors

jhwohlgemuth avatar

Watchers

 avatar

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.