Giter Site home page Giter Site logo

pilwon / ultimate-seed Goto Github PK

View Code? Open in Web Editor NEW
854.0 68.0 180.0 5.33 MB

{MEAN Stack on Steroids} The ultimate full-stack AngularJS + Node.js/Express seed (batteries included!) that makes web developers insanely productive. (Angular, AngularUI, Barbeque, Bootstrap, Bower, Browserify, Docker, Express, Font Awesome, Grunt, Handlebars, jQuery, JSHint, Karma/Mocha, LESS/LESSHat, Livereload, Lodash/Underscore, Modernizr, MongoDB/Mongoose, Passport for Facebook/Google/Twitter, Redis, SocketIO, Source Maps, Uglify, Winston)

JavaScript 93.35% CSS 6.17% Shell 0.48%

ultimate-seed's Introduction

       _      _    _____   _   _       ____   _____   _____        ____   _____  _____  ____
      / \ /\ / \  /__ __\ / \ / \__/| /  _ \ /__ __\ /  __/       / ___\ /  __/ /  __/ /  _ \
      | | || | |    / \   | | | |\/|| | / \ |  / \   |  \  _____  |    \ |  \   |  \   | | \|
      | \_/| | |_/\ | |   | | | |  || | |-| |  | |   |  /_ \____\ \___ | |  /_  |  /_  | |_/|
      \____/ \____/ \_/   \_/ \_/  \| \_/ \ |  \_/   \____\       \____/ \____\ \____\ \____/

Screenshot Screenshot

ultimate-seed is the ultimate full-stack AngularJS + Node.js/Express seed (batteries included!) that makes web developers insanely productive.

This project uses ultimate dependency library.

Batteries Included

ultimate-seed comes with many of popular, battle-tested modern web frameworks and libraries. All these parts are already wired together for you using best practices! :) Don't waste time writing boilerplate code.

How to Use

Dependencies

Dependency Installation
Node.js download
MongoDB download
Redis download
Bower npm install bower -g
Grunt npm install grunt-cli -g

Make sure both MongoDB and Redis servers running somewhere. (You can use free hosting services such as MongoHQ or MongoLab for MongoDB and Redis To Go or RedisCloud for Redis.) Then, update configuration information in config/{development,production,staging}.json.

If you find any reason not to use Redis in your project, you can easily achieve it by following this instruction:

  1. Change the value of session.store._use to mongo in config/{development,production,staging}.json. (This lets ultimate-seed use MongoDB as session backend.)
  2. Comment out the line ultimate.db.redis.connect(app.config.db.redis); in server/app.js. (This prevents server connecting to Redis server.)

Installation

Method 1: Yeoman Generator

Yeoman generator for ultimate-seed can be used to clone the seed project.

$ npm install -g yo
$ npm install -g generator-ultimate
$ yo ultimate

Method 2: Git Clone

Download ultimate-seed and install dependency modules:

$ git clone https://github.com/pilwon/ultimate-seed.git ultimate-seed
$ cd ultimate-seed
$ npm install && bower install

Method 3: Git Branch Tracking Remote

Now create seed branch that tracks remote branch ultimate-seed/master:

$ git remote add seed https://github.com/pilwon/ultimate-seed.git
$ git fetch seed
$ git checkout -b seed seed/master

Merge seed to master branch by squashing commit log:

$ git checkout master
$ git merge seed
$ npm install && bower install

Resolve merge conflicts then push to origin/master:

$ git push

Development (config/development.json)

Grunt tasks to build your app:

$ grunt                    # start server
$ grunt build              # jshint & build
$ grunt clean              # clean generated files
  • If you see the Could not load the bindings file. error message, please perform npm rebuild then try again.

Testing

End-to-End (E2E) Testing with Protractor

Protractor wraps around WebDriverJS, which is a javascript binding for Selenium-Webdriver.

Selenium-Webdriver is a browser automation framework. Tests are written with the WebDriver API, which communicates with a Selenium server to control the browser under test. - Protractor Getting Started Guide

Therefore, you need to first download and install Selenium standalone server. If you successfully performed npm install, you will have ./node_modules/.bin/webdriver-manager. You can download and install Selenium standalone server by the following command:

$ ./node_modules/.bin/webdriver-manager update

From then on, you can start the server via:

$ ./node_modules/.bin/webdriver-manager start

You need to have the Selenium server running before running E2E tests. Once the Selenium server is running, you should also start the application server (in another tab) because your tests will run against it:

$ grunt

While the application server is running, open another tab and run e2e tests using Protractor.

$ grunt test

Enjoy watching your tests running inside a real browser (Chrome by default). If you'd like to change Protractor configuration, check out config/test/protractor-e2e.conf.js.

Deployment

Production/Staging Server (config/{production|stging}.json)

First, prepare and optimize all files used in production/staging environment:

$ grunt build

Then your app can be started in production/staging mode using this command:

$ NODE_ENV={production|staging} node server

It is recommended to use a tool like forever to ensure your app running continuously:

$ npm install forever -g
$ NODE_ENV={production|staging} PORT=3000 forever start server

You can alternatively use a system-wide process control system such as Supervisor with the following configuration (supervisord.conf):

[program:ultimate-3000]
directory = <absolute-path-of-project-root>
environment = NODE_ENV={production|staging}, PORT=3000
command = node server
autostart = true
autorestart = true

Heroku

ultimate-seed supports deployment of your app to Heroku servers.

  1. Modify config/heroku.json.
  2. Comment out the following lines in .gitignore. * /.cachebust * /client/js/node_modules/bower_components/ * /client-built/ * /config/heroku.json * /node_modules/
  3. Run grunt build to build the project.
  4. Commit all files to a local git repository created at the project root.
  5. Add git remote pointing to Heroku: * New Heroku app: heroku create APPID * Existing Heroku app: heroku git:remote -a APPID
  6. Set the environment variable: heroku config:set NODE_ENV={production|staging} ERROR_PAGE_URL=http://APPID.herokuapp.com/404.html
  7. Enable websocket support: heroku labs:enable websockets
  8. (Optional) Install MongoDB and Redis add-ons to the Heroku app. ultimate-seed reads environment variables attached by these add-ons. (Note: Add-on environment variables will override MongoDB/Redis configuration values in config/heroku.json): * Mongo: heroku addons:add mongohq:sandbox or heroku addons:add mongolab:sandbox * Redis: heroku addons:add redistogo:nano or heroku addons:add rediscloud:20
  9. Deploy application to Heroku using git push heroku +master
  10. Deployed at http://APPID.herokuapp.com/

Using Docker

  1. Install Docker.
  2. Download the seed project: git clone https://github.com/pilwon/ultimate-seed.git && cd $_
  3. Install dependencies: bower install && npm install
  4. Make code changes if desired.
  5. Build the project: grunt build
  6. Build Docker image: docker build -t ultimate-seed .
  7. Run redis and mongodb containers: - MongoDB: docker run -d --name mongodb dockerfile/mongodb - Redis: docker run -d --name redis dockerfile/redis
  8. Run the project container: CID=$(docker run -d -p 3000:80 --link redis:redis --link mongodb:mongodb ultimate-seed)
  9. Check logs: docker logs $CID
  10. Open in the browser: http://localhost:3000/

Using REPL (read-eval-print loop)

This is helpful when you need to debug problems on the production server. You can connect to REPL of the running server via UNIX socket. By default, it creates UNIX socket at /tmp/ultimate-repl.<PID> but you can configure it in config/{development,production,staging}.json. In order to connect to it, simply run:

$ nc -U /tmp/ultimate-repl.<PID>
ultimate>

or if you want readline's line editing and persistent history (i.e. using up/down arrow key to see the command history), then install rlwrap (on Mac, brew install rlwrap) and run:

$ rlwrap nc -U /tmp/ultimate-repl.<PID>
ultimate>

Once you are connected, you can evaluate Javascript expression.

ultimate> 3 + 3
6
ultimate>

For your convenience, several variables/functions are exposed. Try the followings:

ultimate> app  // ultimate app object
ultimate> ld  // lodash (underscore) object (couldn't use _ because it has special meaning in REPL i.e. the result of the last expression)
ultimate> ultimate  // ultimate object that ultimate-seed utilizes
ultimate> showRoutes()  // shows an array of all routes (e.g. [ ..., 'GET /api/user/features/:id', ...])

Directory Structure

.
├── client/
│   ├── components/
│   ├── fonts/
│   │   ├── font-awesome/
│   │   └── glyphicons/
│   ├── js/
│   │   ├── {{module}}/
│   │   │   ├── controllers/
│   │   │   ├── directives/
│   │   │   ├── services/
│   │   │   ├── templates/
│   │   │   │   └── {{template}}.html
│   │   │   └── index.js
│   │   ├── node_modules/
│   │   │   ├── bower_components/
│   │   │   └── custom_components/
│   │   ├── app.js
│   │   └── index.js
│   └── less/
│       ├── _layouts/
│       ├── bootstrap/
│       ├── font-awesome/
│       ├── lesshat/
│       └── social-buttons/
├── config/
│   ├── server/
│   │   └── nginx.conf
│   ├── test/
│   │   ├── karma-e2e.conf.js
│   │   ├── karma-unit.conf.js
│   │   └── protractor-e2e.conf.js
│   ├── development.json
│   ├── production.json
│   └── staging.json
├── log/
├── node_modules/
├── server/
│   ├── controllers/
│   ├── lib/
│   ├── models/
│   ├── sockets/
│   ├── views/
│   │   ├── _helpers/
│   │   ├── _layouts/
│   │   │   └── default.hbs
│   │   ├── _partials/
│   │   │   └── livereload.hbs
│   │   ├── home/
│   │   ├── status/
│   │   └── empty.hbs
│   ├── app.js
│   ├── index.js
│   ├── routes.js
│   ├── socketio.js
│   └── winston.js
├── static/
│   ├── img/
│   ├── 404.html
│   ├── favicon.ico
│   └── robots.txt
├── worker/
│   ├── task/
│   ├── index.js
│   └── process.js
├── .bowerrc
├── .editorconfig
├── .jshintrc
├── .slugignore
├── Gruntfile.js
├── Procfile
├── bower.json
├── npm-scripts.js
├── package.json
└── project.json

FAQ

How do I fix the error EMFILE: Too many opened files.?

This is an issue with grunt-contrib-watch. You can fix it by increasing your system's max opened file limit. See this answer NOTE: Even if ulimit command on the shell gives you 'unlimited', you might still need to increase the max opened file limit.

How do I fix Error: Could not load the bindings file.?

If you are using node version manager n, you might come across the following error message when running grunt:

  Fatal error: Server ["/Users/username/path-to-ultimate-seed/server"] -  Error: Could not load the bindings file. Tried:
→ /Users/username/path-to-ultimate-seed/node_modules/bcrypt/build/bcrypt_lib.node
→ /Users/username/path-to-ultimate-seed/node_modules/bcrypt/build/Debug/bcrypt_lib.node
...
→ /Users/username/path-to-ultimate-seed/node_modules/bcrypt/build/default/bcrypt_lib.node
→ /Users/username/path-to-ultimate-seed/node_modules/bcrypt/compiled/0.10.23/darwin/x64/bcrypt_lib.node

In order to fix it, run npm rebuild. Then you will be able to run grunt without seeing the above error message.

Contributing to the Project

We welcome your pull requests to the dev branch.

Credits

Thanks to all the other contributors as well! :)

License

The MIT License (MIT)

Copyright (c) 2012-2014 Pilwon Huh

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Analytics

ultimate-seed's People

Contributors

hal-gh avatar kerimdzhanov avatar lordnox avatar oori avatar pilwon avatar samitny avatar yaru22 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  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

ultimate-seed's Issues

Using rhtml with Angular's $templateCache.

Right now, we're using rhtml to minify template and inlining it to views. i.e.

ngModule.config(function ($stateProvider) {
  $stateProvider
    .state('app.admin', {
      url: '/admin',
      views: {
        '@': {
          controller: 'MainCtrl',
          template: rhtml('./templates/main.html')
        }
      }
    });
});

However, this could increase the code size if more than one controller shares the same template. I think the better approach would be, for example,

angular.module('app.admin.template', []).run(function($templateCache) {
  $templateCache.put('adminMain.html', rhtml('./templates/main.html'));
});

and then

'@': {
  controller: 'MainCtrl',
  templateUrl: 'adminMain.html'
}

This way, even if there are multiple controllers that want to use the same template, we are going to include it in our code base only once.

CRUD needed

May I please request for adding some CRUD to this seed.
What I mean is that it would include some end-points for adding removing updating and listing articles.
This would be a good starting point for new users.

Thank you.
Cheers,
Amir

grunt test doesn't work

How can we fix the "require" issue? I don't really want to unit test the development build as one file, would be nice if it worked with each require in each file?

Chrome 29.0.1547 (Linux) ERROR
    Uncaught ReferenceError: module is not defined
    at /srv/ultimate-seed/client/js/account/controllers/_layout.js:7
Chrome 29.0.1547 (Linux) ERROR
    Uncaught ReferenceError: module is not defined
    at /srv/ultimate-seed/client/js/account/controllers/summary.js:7
Chrome 29.0.1547 (Linux) ERROR
    Uncaught ReferenceError: require is not defined
    at /srv/ultimate-seed/client/js/account/index.js:7
Chrome 29.0.1547 (Linux) ERROR
    Uncaught ReferenceError: module is not defined
    at /srv/ultimate-seed/client/js/admin/controllers/_layout.js:7
Chrome 29.0.1547 (Linux): Executed 0 of 0 ERROR (0.111 secs / 0 secs)

How to authenticate a request via token?

Hi,

I just discovered, there's an accessToken feature-including serialization and deserialisation-how would i issue requests that get actually authenticated by the accesstoken?

Thanks in advance,
Cedric

Passport redirect for Facebook is always to localhost

For the life of me I can't figure out why the redirect url is always Facebook for my Heroku app. When I try to login with Facebook, I get an error, but the essence of it is that the redirect callback is always set to localhost instead of my domain. Am I missing a piece of configuration to get it to use the domain instead?

https://www.facebook.com/dialog/oauth?response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fauth%2Ffacebook%2Fcallback&scope=email&client_id=152247794979222&type=web_server

Request all dependency package owners to add .npmignore

It's taking too long to install all dependencies. It appears that most of dependency packages do not contain .npmignore or files specified in package.json to cherry pick what files gets blacklisted or whitelisted in the published npm packages. It will be nice if we inform each one of them about this technique and reduce the overall size and time to install all dependencies.

Express static configuration has typo error

I don't if anyone is using this in production mode, but there is a typo in Ultimate module, express.js.

'proudction' should be 'production'

_server.configure('heroku', 'proudction', function () {

Disable form button on submit.

Enable again only when error is returned and form data is changed.
This way, same form data won't be submitted over and over.

Consider supporting subscription system

Why not add a subscription system: with monthly and annual plans, free trials, coupons, etc. And some payment processor handling (Stripe & PayPal maybe?)

Improve project.json format.

{
  "bower": "client/js/node_modules/bower_components",
  "config": "config",
  "log": "log",
  "test": "test",
  "temp": ".tmp",
  "client": {
    "base": {
      "root": "client",
      "index": "index.html",
      "fonts": "fonts",
      "img": "img",
      "js": "js",
      "less": "less"
    },
    "dist": "client-built"
  },
  "server": {
    "base": "server"
  }
}

Error Forbidden upon local registration

Hello,

I'm wondering if I'm doing this wrong. I've setup ultimate-seed such that I have all of the dependencies and modules. I've got redis running and on the default port. The site comes up correctly for the most part. In some cases there is no login or register button (chromebook and chrome on vista)

When I register using the standard passport I get the following error. It does appear that my user can log in. However on the 1st login, they also get a similar error.

Error: Forbidden
at Object.exports.error (/home/shadoobie/workspaces/website/ultimate-seed/node_modules/express/node_modules/connect/lib/utils.js:60:13)
at /home/shadoobie/workspaces/website/ultimate-seed/node_modules/express/node_modules/connect/lib/middleware/csrf.js:54:41
at module.exports (/home/shadoobie/workspaces/website/ultimate-seed/node_modules/ultimate/lib/server/controller/csrf.js:10:17)
at callbacks (/home/shadoobie/workspaces/website/ultimate-seed/node_modules/express/lib/router/index.js:161:37)
at module.exports (/home/shadoobie/workspaces/website/ultimate-seed/node_modules/ultimate/lib/server/controller/ensureLoggedOut.js:11:3)
at callbacks (/home/shadoobie/workspaces/website/ultimate-seed/node_modules/express/lib/router/index.js:161:37)
at param (/home/shadoobie/workspaces/website/ultimate-seed/node_modules/express/lib/router/index.js:135:11)
at pass (/home/shadoobie/workspaces/website/ultimate-seed/node_modules/express/lib/router/index.js:142:5)
at Router._dispatch (/home/shadoobie/workspaces/website/ultimate-seed/node_modules/express/lib/router/index.js:170:5)
at Object.router (/home/shadoobie/workspaces/website/ultimate-seed/node_modules/express/lib/router/index.js:33:10)
at next (/home/shadoobie/workspaces/website/ultimate-seed/node_modules/express/node_modules/connect/lib/proto.js:190:15)
at next (/home/shadoobie/workspaces/website/ultimate-seed/node_modules/express/node_modules/connect/lib/proto.js:192:9)
at Object.static (/home/shadoobie/workspaces/website/ultimate-seed/node_modules/express/node_modules/connect/lib/middleware/static.js:55:61)
at next (/home/shadoobie/workspaces/website/ultimate-seed/node_modules/express/node_modules/connect/lib/proto.js:190:15)
at next (/home/shadoobie/workspaces/website/ultimate-seed/node_modules/express/node_modules/connect/lib/proto.js:165:78)
at Object.handle (/home/shadoobie/workspaces/website/ultimate-seed/server/app.js:115:5)
at next (/home/shadoobie/workspaces/website/ultimate-seed/node_modules/express/node_modules/connect/lib/proto.js:190:15)
at Object.handle (/home/shadoobie/workspaces/website/ultimate-seed/node_modules/ultimate/lib/server/middleware/hidePoweredByHeader.js:16:5)
at Context.next (/home/shadoobie/workspaces/website/ultimate-seed/node_modules/express/node_modules/connect/lib/proto.js:190:15)
at Context.actions.pass (/home/shadoobie/workspaces/website/ultimate-seed/node_modules/passport/lib/passport/context/http/actions.js:77:8)
at SessionStrategy.authenticate (/home/shadoobie/workspaces/website/ultimate-seed/node_modules/passport/lib/passport/strategies/session.js:52:10)
at attempt (/home/shadoobie/workspaces/website/ultimate-seed/node_modules/passport/lib/passport/middleware/authenticate.js:243:16)
at Passport.authenticate (/home/shadoobie/workspaces/website/ultimate-seed/node_modules/passport/lib/passport/middleware/authenticate.js:244:7)
at next (/home/shadoobie/workspaces/website/ultimate-seed/node_modules/express/node_modules/connect/lib/proto.js:190:15)
at Passport.initialize (/home/shadoobie/workspaces/website/ultimate-seed/node_modules/passport/lib/passport/middleware/initialize.js:69:5)
at next (/home/shadoobie/workspaces/website/ultimate-seed/node_modules/express/node_modules/connect/lib/proto.js:190:15)
at Object.handle (/home/shadoobie/workspaces/website/ultimate-seed/node_modules/ultimate/lib/server/middleware/methodOverride.js:27:5)
at next (/home/shadoobie/workspaces/website/ultimate-seed/node_modules/express/node_modules/connect/lib/proto.js:190:15)
at Object.methodOverride as handle
at next (/home/shadoobie/workspaces/website/ultimate-seed/node_modules/express/node_modules/connect/lib/proto.js:190:15)
at next (/home/shadoobie/workspaces/website/ultimate-seed/node_modules/express/node_modules/connect/lib/middleware/session.js:313:9)
at /home/shadoobie/workspaces/website/ultimate-seed/node_modules/express/node_modules/connect/lib/middleware/session.js:337:9
at /home/shadoobie/workspaces/website/ultimate-seed/node_modules/connect-mongo/lib/connect-mongo.js:192:17
at /home/shadoobie/workspaces/website/ultimate-seed/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/collection.js:1010:5
at Cursor.nextObject (/home/shadoobie/workspaces/website/ultimate-seed/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/cursor.js:653:5)
at commandHandler (/home/shadoobie/workspaces/website/ultimate-seed/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/cursor.js:635:14)
at null. (/home/shadoobie/workspaces/website/ultimate-seed/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/db.js:1709:18)
at g (events.js:175:14)
at EventEmitter.emit (events.js:106:17)
at Server.Base._callHandler (/home/shadoobie/workspaces/website/ultimate-seed/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/connection/base.js:130:25)
at /home/shadoobie/workspaces/website/ultimate-seed/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/connection/server.js:522:20
at MongoReply.parseBody (/home/shadoobie/workspaces/website/ultimate-seed/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:132:5)
at null. (/home/shadoobie/workspaces/website/ultimate-seed/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/connection/server.js:481:22)
at EventEmitter.emit (events.js:95:17)
at null. (/home/shadoobie/workspaces/website/ultimate-seed/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:190:13)
at EventEmitter.emit (events.js:98:17)
at Socket. (/home/shadoobie/workspaces/website/ultimate-seed/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/connection/connection.js:382:22)
at Socket.EventEmitter.emit (events.js:95:17)
at Socket. (stream_readable.js:699:14)
at Socket.EventEmitter.emit (events.js:92:17)
at emitReadable
(_stream_readable.js:382:10)
at emitReadable (_stream_readable.js:377:5)
at readableAddChunk (_stream_readable.js:142:7)
at Socket.Readable.push (_stream_readable.js:112:10)

at TCP.onread (net.js:496:21)

How do you become an admin via restify.model?

I have the admin role setup on my user, but when I do a get request, it's returning the schema for user and not the * defined for admin. Is their a different route or config piece I'm missing?

transactional emails

Would be nice to get some transactional emails (possibly even via Sendgrid API) for various activities: completing reports, etc.

Okay, may be expanding this sucker out a bit beyond a seed. But, still, there usually always needed!

bcrypt Error: Could not load the bindings file.

I'm using:

  • node v0.10.21
  • npm 1.3.11
  • grunt v0.4.1
  • grunt-cli v0.1.9
  • mongodb 2.4.7
Fatal error: Server ["/Users/remi/git/ultimate-seed/server"] -  Error: Could not load the bindings file. Tried:
 → /Users/remi/git/ultimate-seed/node_modules/bcrypt/build/bcrypt_lib.node
 → /Users/remi/git/ultimate-seed/node_modules/bcrypt/build/Debug/bcrypt_lib.node
 → /Users/remi/git/ultimate-seed/node_modules/bcrypt/build/Release/bcrypt_lib.node
 → /Users/remi/git/ultimate-seed/node_modules/bcrypt/out/Debug/bcrypt_lib.node
 → /Users/remi/git/ultimate-seed/node_modules/bcrypt/Debug/bcrypt_lib.node
 → /Users/remi/git/ultimate-seed/node_modules/bcrypt/out/Release/bcrypt_lib.node
 → /Users/remi/git/ultimate-seed/node_modules/bcrypt/Release/bcrypt_lib.node
 → /Users/remi/git/ultimate-seed/node_modules/bcrypt/build/default/bcrypt_lib.node
 → /Users/remi/git/ultimate-seed/node_modules/bcrypt/compiled/0.10.21/darwin/x64/bcrypt_lib.node

Fix bug in trailing slash middleware

http://localhost:3000/?x=y

GET /?x=y 302 15ms
GET /?x=y 302 5ms
GET /?x=y 302 4ms
GET /?x=y 302 11ms
GET /?x=y 302 1ms
GET /?x=y 302 1ms
GET /?x=y 302 23ms
GET /?x=y 302 4ms
GET /?x=y 302 23ms
GET /?x=y 302 3ms
GET /?x=y 302 2ms
GET /?x=y 302 0ms
GET /?x=y 302 4ms
GET /?x=y 302 3ms
GET /?x=y 302 6ms
GET /?x=y 302 2ms
GET /?x=y 302 1ms
GET /?x=y 302 0ms
GET /?x=y 302 0ms
GET /?x=y 302 2ms
GET /?x=y 302 3ms

Windows: Symbolic link to font files fails

It seems that the symbolic links to the font files (client/fonts) is not working on Windows machines. Is it possible to make it similar to the less/css behaviour?

So the symbolic links will be resolved and the files will be copied to the tmp folder. When the fonts folder is accessed automatically the tmp folder shall be read. Unfortunately I cannot find the place where this routing for the css files was implemented. Could you please give me a hint so I can extend it? Thanks!

Use HTTP status code constants

Not sure if there's a module for this, but in the code, it would be more readable if we use constants like:

if (status === HTTP.NOT_FOUND)

instead of

if (status === 404)

What do you think?

How to use Ultimate-seed?

lets say, I would like to add "posts" menu that retrieve posts.json from the server and render it to the page

http://localhost:3000/posts

From your Ultimate-seed layout.
Choice 1 -- create a new posts directory

  • add "posts" to layout/templates/_nav.html
  • in client/js/app.js -- add "app.posts" to ngModule
  • in client/posts/index.js -- create app.posts
  • in client/posts/templates/posts.html

Choice 2 --- or create it part of "express"
like express.posts, express.users, etc

Which one is a good choice?
thanks

Support server-side plugins.

  • Turn auth, socketio, winston related code into auto-discoverable plugins.
  • project.json:
{
  "server": {
    "plugins": {
      "auth": true,
      "auth-facebook": true,
      "auth-google": true,
      "auth-twitter": true,
      "socketio": true,
      "winston": true
    }
  }
}

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.