NB: This project is forked from Tarmo's project with a minimal user management system.
TODO:
- Add User management
- Add User roles
- Clean up the passport and user association step in UserController.create
Modern web applications has separated front- and backend sides to use. This boilerplate present one way to make your application which have fully separated back- and frontend sides.
- Separate back- and frontend development
- Light frontend application
- Authenticate with backend (possible multiple ways: local, github, twitter, etc.)
- Power of AngularJS + WebSockets
- Simple examples how to use these
backend/ = Sails.js server, just API nothing else
frontend/ = Slush-angular, just frontend side
For backend side this boilerplate uses Sails.js (imho awesome). See more info at https://github.com/balderdashy/sails I have just done some small tweaks to generic workflow of sails nothing else.
Boilerplate uses slush-angular for frontend (AngularJS using Google Angular App Structure Recommendations). See more info at https://github.com/slushjs/slush-angular This library is awesome to distribute frontend.
- Sails.js, http://sailsjs.org/
- slush-angular, https://github.com/slushjs/slush-angular
- AngularJS, https://angularjs.org/
- Bootstrap, http://getbootstrap.com/
- Techniques for authentication in AngularJS applications, https://medium.com/opinionated-angularjs/7bbf0346acec
- Json Web Tokens, http://angular-tips.com/blog/2014/05/json-web-tokens-examples/
First of all you have to install npm
to your box. Also you need node.js
installed to your box.
And when you have installed those you have to run following commands. Those will install the main packages that you
need to run this application.
npm install bower -g npm install slush -g npm install sails -g
After you have fetched codes of this project to your computer, please follow instructions below.
Change your /frontend/src/app/index.html
file, locate io.sails.url
and but your backend
URL address there. Also you have add your own local.js
to your backend side. There is an example file
for that /backend/config/local_example.js
, just copy that file to /backend/config/local.js
file and make necessary changes and you're ready to go.
cd backend npm install
cd frontend npm install bower install
You have to start both backend
and frontend
servers to run this project. These can
be started
cd backend sails lift
As in development
cd frontend gulp serve
As in production
cd frontend gulp dist gulp production
This might be up and running... or not. http://wunder.sytes.net:3000/
Tarmo Leppänen
The MIT License (MIT)
Copyright (c) 2014 Tarmo Leppänen
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.