|
| 1 | +What is this? |
| 2 | +============= |
| 3 | + |
| 4 | +This is a simple HTML prototype written in HAML or ERB that is designed to be |
| 5 | +viewed with Serve. |
| 6 | + |
| 7 | +What is Serve? Serve is an open-source rapid prototyping framework for Web |
| 8 | +applications. It makes it easy to prototype functionality without writing a |
| 9 | +single line of backend code. |
| 10 | + |
| 11 | + |
| 12 | +How do I install and run Serve? |
| 13 | +------------------------------- |
| 14 | + |
| 15 | +Serve is distributed as a Ruby gem to make it easy to get up and running. You |
| 16 | +must have Ruby installed in order to download and use Serve. The Ruby download |
| 17 | +page provides instructions for getting Ruby setup on different platforms: |
| 18 | + |
| 19 | +<http://www.ruby-lang.org/en/downloads/> |
| 20 | + |
| 21 | +After you have Ruby installed, open up the command prompt and type: |
| 22 | + |
| 23 | + gem install serve |
| 24 | + |
| 25 | +(OSX and Unix users may need to prefix the command with `sudo`.) |
| 26 | + |
| 27 | +After Serve is installed, you can start it up in a given directory like this: |
| 28 | + |
| 29 | + serve |
| 30 | + |
| 31 | +This will start Serve on port 4000. You can now view the prototype in your |
| 32 | +Web browser at this URL: |
| 33 | + |
| 34 | +<http://localhost:4000> |
| 35 | + |
| 36 | + |
| 37 | +Compass and Sass |
| 38 | +---------------- |
| 39 | + |
| 40 | +This prototype uses Compass and Sass to generate CSS. Both are distributed as |
| 41 | +Ruby gems and can be easily installed from the command prompt. Since the |
| 42 | +Compass gem depends on Sass, you can install them both with one command: |
| 43 | + |
| 44 | + gem install compass |
| 45 | + |
| 46 | +Learn more about Sass: |
| 47 | + |
| 48 | +<http://sass-lang.org> |
| 49 | + |
| 50 | +Learn more about Compass: |
| 51 | + |
| 52 | +<http://compass-style.org> |
| 53 | + |
| 54 | + |
| 55 | +Rack and Passenger |
| 56 | +------------------ |
| 57 | + |
| 58 | +Astute users may notice that this project is also a simple Rack application. |
| 59 | +This means that it is easy to deploy it on Passenger or in any other |
| 60 | +Rack-friendly environment. Rack it up with the `rackup` command. For more |
| 61 | +information about using Serve and Passenger see: |
| 62 | + |
| 63 | +<http://bit.ly/serve-and-passenger> |
| 64 | + |
| 65 | + |
| 66 | +Exporting |
| 67 | +--------- |
| 68 | + |
| 69 | +To export this project to pure HTML and CSS you will need the prerelease |
| 70 | +version of Serve. To get started with the prerelease version: |
| 71 | + |
| 72 | + gem install --pre serve |
| 73 | + |
| 74 | +To export your project, use the new "export" command: |
| 75 | + |
| 76 | + serve export <project>:<output> |
| 77 | + |
| 78 | +Where "project" is the path to the project and "output" is the path to the |
| 79 | +directory where you would like your HTML and CSS generated. |
| 80 | + |
| 81 | + |
| 82 | +Learning More |
| 83 | +------------- |
| 84 | + |
| 85 | +You can learn more about Serve on the GitHub project page: |
| 86 | + |
| 87 | +<http://github.com/jlong/serve> |
0 commit comments