Giter Club home page Giter Club logo

nodangular's Introduction

Nodangular

A bare bones all-in-one boilerplate for creating Web Applications for desktop and mobile.

It is based on the MEAN stack and uses MongoDB, Express, AngularJS and Node to create an entire solution and workflow for building practically anything in a short amount of time.

The Frontend stack uses Jade and Sass with Grunt which builds your project and refreshes styles as you code!

Features (development mode)

  • Live reloads CSS and HTML
  • Jade Templates
  • Sass Stylesheets
  • Automatically builds your project as you code
  • Keeps scripts un-minified and un-concatenated for easy debugging

Features (production mode)

  • Build the project with one command: grunt --production
  • Minifies and concats scripts using UglifyJS

Requirements

Setup (Development)

  • npm install
    Installs all node modules

  • grunt
    Runs the build task and then watches files. When jade/sass/scripts change, it builds them. Also livereloads the browser when css changes

  • nodemon server.js or node server
    Nodemon will restart server when server files change. If you prefer not to use it, just run default node app

Setup (Production)

  • npm install --production
    Only install node modules needed for production (excludes devDependencies)

  • grunt --production
    Builds the project and exits

  • forever server.js or node server.js
    Starts the node server. Forever is a utility that will restart your node server when it crashes or the machine reboots

Working with Scripts

In development, public_src/index.jade is injected with the scripts located in public_src/scripts.json. In production we use scripts.json to concatinate and minify files preserving their order, we then inject a single script into public_src/index.jade for performance reasons.

When you need to add/update scripts, all you need to do is edit the file located at public_src/scripts.json and everything is handled automatically.

Bonus

  • User signup/login is already implemented as a template for working with the RESTful api
  • A basic Angular Frontend is already set up with some best practices. I will be working on this more in the near future

Coming soon (todo)

  • SMTP server + nodemailer
  • Favicon + App Icon
  • Karma + Jasmine
    • Unit tests
  • Angular
    • touch
    • resource template

Known issues

  • Adding a new script to an empty folder in public_src/scripts does not trigger watch. This is a known issue, and for now, requires you to just re-run grunt

Production Notes

  • You can run mongod in the background permanently with "sudo mongod --fork --logpath /var/log/mongod.log" Then to kill it, find his pid with "ps aux | grep mongod" and "kill "

nodangular's People

Watchers

Dave Hoo avatar James Cloos 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.