MEAN stack boilerplate - with CRUD architecture MongoDB - Express - Angular 2 - NodeJS (will be updated to Angular 4)
https://www.npmjs.com/package/mean-stack-boilerplate
npm install
node server.js
npm start
- Navigate to
localhost:3000/
npm run lint
-> Lintingnpm run debug
NODE_ENV=test mocha --reporter spec app/tests
set NODE_ENV=test
mocha --reporter spec app/tests
-
https://chrome.google.com/webstore/detail/augury/elgalmkoelokbchhkhacckoklkejnhcd/related
-
AngularJS Batarang
-
Unit tests
-
E2E tests
-
Testing Express
-
Mocha
-
Should.js
-
Super test modules
-
Testing for front-end Angular 2 - Jasmine
-
Karma - test runner
-
PhantomJS browser launcher - headless browser
describe(description, callback)
it(description, callback)
before(callback)
beforeEach(callback)
after(callback)
afterEach(callback)
db.products.insert({ title: 'Product1', stock: 15, price: 112.36 })
db.products.find()
db.products.update({}, { $set: {title: 'MEANshop'} }, { multi: true} )
db.products.remove({})
db.products.aggregate([{ $group: { _id: null, total: { $sum: "$price" } } }])
db.products.aggregate([ { $match: {title: 'Product' }}, { $group: { _id: '$title', total: { $sum: "$price" } }} ])
- Aggregators :
$sum,$match,$group,$sort
Model.find(conditions, [fields], [options], [callback])
Model.findById(id, [fields], [options], [callback])
Model.findOne(conditions, [fields], [options], [callback])
- ``
Model.update(conditions, update, [options], [callback])
Model.findByIdAndUpdate(id, [update], [options], [callback])
Model.findOneAndUpdate([conditions], [update], [options], [callback])
Model.remove(conditions, [callback])
Model.findByIdAndRemove(id, [options], [callback])
Model.findOneAndRemove(conditions, [options], [callback])
- Heroku :
foreman start
-heroku create
-git push heroku master
- add single web dynoheroku ps:scale web=1
-check liveheroku open
- Firebase
- Google cloud platform
git init
git add .
git commit -m "first commit"
NODE_ENV=production
- Replace hash with HTML5 routing mode
npm run debug
: debug the application