Sweet Jumps is an Express based framework / boilerplate stack for Node.js web applications built on a set of proven modules with the flexibility to do what you want with your code.
Sweet Jumps was made to fill a need for a full-stack web framework that was built from existing, proven Node modules. This allows Sweet Jumps to both use the power of the community of Node developers while also providing consistency and speed of development by being opinionated about style and structure.
Sweet Jumps is both a boilerplate and a set of tools for generating code, developing, and testing.
Philosophically, Sweet Jumps aims to provide style and practice as well as a physical structure and stack of common modules, but allows you the freedom to swap out what you want. Would you rather use Jade than Handlebars (or don't need templates at all)? Go right ahead! Need a MySQL adapter instead of MongoDB? Not a problem. The rest of the framework will still be available.
Install Sweet Jumps globally (or by whatever method you choose) to gain access to the
sj command line utility:
$ npm -g install sweet-jumps
Create a new project directory.
Generate a new project:
$ sj create project --name="My Awesome Project" --server-simple
--server-simple, you may wish to use one of the other base application templates:
--server-hookedallows you to hook Sweet Jumps events, and
--server-extendedprovides an application class which extends Sweet Jumps.
$ npm install
Optional - Install client-side dependencies:
$ bower install
Set up your configuration files in /config.
$ cp config/production.example.json config/production.json
When you run your server, it will appear at http://localhost:5050 by default (or 5051 if you also copy the default development config).
Start writing routes/controllers, middleware, models, etc as needed. Examples are provided for each. See the documentation for
sj to see what kinds of modules can be generated for you.
Use Grunt during development. If you don't already have the Grunt CLI on your system, install it:
$ npm install -g grunt-cli
Several Grunt tasks are included to ease development, provide linting, unit testing, asset management, and more. In particular, during development you may want to run the following Grunt tasks:
Start the node server.js in dev mode and watch for changes (if you need to run in a different environment, add it after develop):
$ grunt develop
Watches for server file changes and lints them:
$ grunt develop:check
Watches client files for changes and rebuilds if necessary:
$ grunt develop:client
$ sj list $ sj help
This is the standard file structure, but many parts are not required. If a particular directory does not make sense for your application, remove it (eg: views and static in a JSON only webservice).
--serverparameter, you will probably have to create or copy this file.
function (app, args...).
function (app, args...).
Configuration is handled using JSON files in the application's config directory. By default the application will load the JSON file corresponding to the environment being used (usually either 'dev' / 'development' or 'prod' / 'production', but could be 'test', 'stage', etc).
The loaded configuration file can "extend" a different config file and override values specific to the current environment without repeating values. Usually, development.json and test.json both extend production.json. In general, you will want to set all configuration in production and if you need specific settings for development, override just those settings in development.json.
Copyright 2013/2014 Northern Arizona University
This file is part of Sweet Jumps.
Sweet Jumps is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Sweet Jumps is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Sweet Jumps. If not, see http://www.gnu.org/licenses/.