Giter VIP home page Giter VIP logo

mean's Introduction

###Bitwise MEAN Boilerplate

Starting a mean project? Just clone this repo and run gulp. This will get you a running express app, complete with a gulp build system. Some things it'll do for you out of the box:

  • ENV Parsing
  • Notifications as tasks complete
  • Javascript Stuff
    • ES6 - Write server and client code in ES6 using Babel
    • Linting
    • iife wrapping
    • Sourcemaps
    • Concatenation
    • Uglification
  • Scripts Installed Out of the Box
    • Angular ^1.4.9
    • UI Router ^0.2.17
    • Bootstrap
    • Font Awesome
  • LESS Compilation
  • Angular Template Cache
  • File Watchers with Live Reload
  • Nodemon for server restarts
  • Automate publishing to AWS

Getting Started

$ git clone [email protected]:Shift3/mean
$ cd mean && npm install
$ cp .env.sample .env
$ gulp

Now open localhost:3000 in your favorite web browser. Out of the box you get a build system, live reload, and an angular app started. All you need to do is drop in your js files and any additional express routes your app may need. Some things to note:

  • Be mindful about how you name files. You should name your modules files like:
    • Modules -> thing.module.js
    • Controllers -> thing.controller.js
    • Services -> thing.service.js
    • Filter -> thing.filter.js
  • The build system will scan the app folder first for any files named *module.js, then it looks for any **/*module.js and finally **/*.js. This will ensure that your angular modules are put first when concatenated into build/app.js.
  • The /build folder is the basis for what is served up in the browser. All of our "built" resources are stuck in this folder.
  • Changes to less, ejs, html templates should trigger a live reload.
  • ES6 is enabled by default, so go crazy wit' all dat new fangled js.
  • Use the John Papa Style Guide when structuring your angular app. Don't pile all your states in your main module file, spread them out through out individual modules see the Welcome Module for an example.

####How to automate AWS publish

$ nano ~/.aws/credentials

Add the following info:

[default]
aws_access_key_id = <your access key id>
aws_secret_access_key = <your secret access key>

Save the file. AWS will authenticate using this file when publishing to your bucket.

In the gulp file, fill in the missing region and bucket:

var publisher = awspublish.create({
  region: '', //example: 'us-west-2'
  params: {
    Bucket: '' //example: 'epicapp.s3sandbox.com'
  }
});

If you don't want gulp to delete files in the bucket that aren't in your local build folder, comment out the following line:

    .pipe(publisher.sync())

To publish to your bucket, just use:

$ gulp publish

mean's People

Contributors

ggoforth avatar thomasthebicyclist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

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

mean's Issues

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.