Coder Social home page Coder Social logo

angular-sailsjs-boilerplate's Introduction

Boilerplate for AngularJS + Sails.js Build Status

Why?

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.

Main goals of this boilerplate

  • 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

Directory structure

backend/    = Sails.js server, just API nothing else
frontend/   = Slush-angular, just frontend side

Backend

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.

Frontend

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.

Used libraries, guides, etc.

Installation

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.

Setup

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.

Backend

cd backend
npm install

Frontend

cd frontend
npm install
bower install
Notes

If you're changing your backend API url to another than http://localhost:1337 you need to make frontend/config/config.json with proper content on it. Use that example file as start.

Running of this project

You have to start both backend and frontend servers to run this project. These can be started

Backend

cd backend
sails lift

Frontend

As in development

cd frontend
gulp serve

As in production

cd frontend
gulp dist
gulp production

Demo

This might be up and running... or not. http://wunder.sytes.net:3000/

Who is using this?

Author

Tarmo Leppänen

License

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.

angular-sailsjs-boilerplate's People

Contributors

ajaskafin avatar bebraw avatar caasjj avatar jstri avatar louim avatar rwoverdijk avatar tarlepp avatar vburghelea 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.