Full Documentation: teslajs.com
Updates: twitter.com/teslajs
Tesla is a modern MVC style framework built on top of Node.js and Express. It's built to be fast, simple and easy to configure, with sane defaults and flexible boilerplates to get you up and running as quickly as possible.
It's still a work in progress, with more features being added, and while the current build seems stable, bug reports are always apreciated!
Simple but useful MVC structure with optional scaffolding to auto-create models, controllers & even a simple JSON API for you. Models use Node-ORM so you’re not tied to a specific database.
If your url’s follow the domain.com/controller/action/:id format, there’s no need to create any custom routing, it will just automatically load the controller/view if it’s found, and throw a 404 if it’s not.
You can choose from EJS, Handlebars, Hogan, Jade or Handlebars for templates. Less, Sass & Stylus are available for css pre-processors (with additional support for Bourbon, Axis & Nib libraries).
Tesla uses a combination of npm and Bower to help create some useful boilerplates when setting up a new app. You can choose to have Tesla add things like jQuery, AngularJS, Foundation, etc. to your view templates automatically when it creates the project.
Tesla utilizes the Grunt task runner to watch for file changes, restarting the server when necessary. It also comes with LiveReload out of the box to auto refresh your browser when files change.
Almost all of the server settings (port number, database settings, etc.) can be easily updated in the config file.
$ npm install tesla-cli -g
$ npm install tesla-cli
Now that you have the command-line tool installed, you can create your first app:
$ tesla mysite
This will create a new barebones site with the name "mysite". Next, install dependencies:
$ cd mysite && npm install
Start the server:
$ gulp
Once the server has started, simply point your browser to: http://localhost:3000
If you choose not to use Grunt, you can start the server by running node server.js
. But using Grunt gives you some extras such as livereload, and watching for changes your files & restarting the server whenever necesary.