A simple server to get started with Amber development
Go to file
R. Tyler Croy 32b2c519ce Switch Resin to use Thor and have one main executable file with subcommands 2013-02-18 07:37:30 -08:00
amber@f595d9727d Update amber to the latest HEAD 2013-02-18 07:14:57 -08:00
bin Switch Resin to use Thor and have one main executable file with subcommands 2013-02-18 07:37:30 -08:00
lib Switch Resin to use Thor and have one main executable file with subcommands 2013-02-18 07:37:30 -08:00
spec Rework the resin gem as a proper Sinatra extension 2012-11-28 20:42:53 -08:00
.gitignore Add a simple .gitignore 2012-05-17 11:57:39 -07:00
.gitmodules Add amber as a submodule to be included 2012-02-24 21:42:11 -08:00
Gemfile Upgrade the Gemfile to use HTTPs when accessing rubygems.org 2013-02-18 07:16:32 -08:00
README.markdown Add a BuildHive status 2012-05-17 12:02:32 -07:00
Rakefile Add a spec task and a default rake task to run it 2012-05-17 11:59:33 -07:00
resin.gemspec Switch Resin to use Thor and have one main executable file with subcommands 2013-02-18 07:37:30 -08:00

README.markdown

Resin: a simple environment for Amber development

Build Status

About

Resin is a simple Sinatra application which allows for a rapid-bootstrap of an Amber project.

The gem bundles a version of Amber and provides the necessary routes to transparently serve up Amber assets or user-defined assets in their current project directory

Getting Started

Read further, or you could just watch this fanciful screencast

First you'll need to install the Gem and make your project directory:

% mkdir my-project
% cd my-project
% gem install resin

Once the gem is installed, make some directories to store your own custom Amber code:

% mkdir st js

These directories will allow you to commit your code from the Amber IDE, so once they're created, just run Resin and navigate to localhost:4567

% runresin

Custom Views

Adding custom views is pretty easy, just create the views directory and start adding HAML files into it. If for example if you wanted to create a URL localhost:4567/user then you would create views/user.haml and fill in your template accordingly.

To embed the Amber JavaScripts in your custom views, you can just call the embed_amber function:

%html
    %head
        %title
            My Custom View
        = embed_amber
    %body
        Hello World