{"id":13880524,"url":"https://github.com/jlong/serve","last_synced_at":"2025-04-13T18:34:02.155Z","repository":{"id":402596,"uuid":"21007","full_name":"jlong/serve","owner":"jlong","description":"Serve is a small Rack-based web server and rapid prototyping framework for Web applications (specifically Rails apps). Serve is meant to be a lightweight version of the Views part of the Rails MVC. This makes Serve an ideal framework for prototyping Rails applications or creating simple websites. Serve has full support for Rails-style partials and layouts.","archived":false,"fork":false,"pushed_at":"2022-07-22T02:50:16.000Z","size":7374,"stargazers_count":836,"open_issues_count":28,"forks_count":90,"subscribers_count":24,"default_branch":"master","last_synced_at":"2024-10-29T15:49:01.914Z","etag":null,"topics":["rails","ruby","webserver","webservers"],"latest_commit_sha":null,"homepage":"http://get-serve.com","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jlong.png","metadata":{"files":{"readme":"README.rdoc","changelog":"CHANGELOG.rdoc","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2008-05-31T14:40:53.000Z","updated_at":"2024-09-10T02:54:25.000Z","dependencies_parsed_at":"2022-08-16T10:25:08.596Z","dependency_job_id":null,"html_url":"https://github.com/jlong/serve","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlong%2Fserve","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlong%2Fserve/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlong%2Fserve/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlong%2Fserve/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jlong","download_url":"https://codeload.github.com/jlong/serve/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248760608,"owners_count":21157391,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["rails","ruby","webserver","webservers"],"created_at":"2024-08-06T08:03:07.074Z","updated_at":"2025-04-13T18:34:02.134Z","avatar_url":"https://github.com/jlong.png","language":"Ruby","readme":"= Serve - Delicious ERB, Haml, and Sass\n\nhttp://raw.github.com/jlong/serve/master/artwork/logo-hifi-3.png\n\nServe is a small Rack-based web server that makes it easy to serve HTML, ERB,\nHaml, or a variety of template languages from any directory.\n\nServe is meant to be a lightweight version of the Views part of the Rails MVC.\nThis makes Serve an ideal framework for prototyping Rails applications or\ncreating simple websites. Serve has full support for Rails-style partials\nand layouts.\n\nServe is made with Rack \u0026 Tilt.\n\n\n== Installation\n\nServe is distributed as a Ruby gem and can be installed from the command\nprompt. Just type:\n\n  gem install serve -v 1.5.2\n\nSome systems, like the Mac, may require that you type:\n\n  sudo gem install serve -v 1.5.2\n\nIf you are new to the command prompt and are a Mac user see:\n\nhttp://wiseheartdesign.com/articles/2010/11/12/the-designers-guide-to-the-osx-command-prompt/\n\nSearch Google for \"command prompt windows\" if you are on a PC to find a simple\ntutorial.\n\n\n== Basic Usage\n\nOnce the gem is installed the `serve` command will be available from the\ncommand prompt. To launch Serve, just type the command and press enter:\n\n  serve\n\nThis will launch a simple web server which you can access from any web browser\nat the following address:\n\n  http://localhost:4000\n\nOnce the server is going it will output a running log of its activity. To\nstop the server at any time, type CTRL+C at the command prompt.\n\nLearn more: http://get-serve.com/documentation/usage\n\n\n== Creating a Structured Serve Project\n\nFor simple projects, you don't need to structure your files in a specific\nway. All ERB, Haml, and Sass files will be processed wherever they are found\nin the project root. But for more complex projects you may want add a bit of structure.\n\nTo create a structured Serve project in the \"project\" directory, type the\nfollowing on the command line:\n\n  serve create project   # create a new project in the project directory\n\nLearn more: http://get-serve.com/documentation/create\n\n\n== Layouts \u0026 Partials\n\nServe has full support for Rails-style layouts and partials.\n\nServe layouts are stored in \"_layout.erb\" or \"_layout.haml\" files in the same directory as the page they are rendering.\n\nLearn more: http://get-serve.com/documentation/layouts\n\nServe partials (much like PHP includes) are rendered using the familiar render syntax:\n\n  \u003c%= render \"footer\" %\u003e\n\nLearn more: http://get-serve.com/documentation/partials\n\n\n== View Helpers\n\nIf you drop a file called \"view_helpers.rb\" in your views directory, you can\ndefine custom helpers for your Haml and ERB views. Just create a ViewHelpers\nmodule and define your custom helper methods there:\n\n  module ViewHelpers\n    \n    # Calculate the years for a copyright\n    def copyright_years(start_year)\n      end_year = Date.today.year\n      if start_year == end_year\n        start_year\n      else\n        start_year.to_s + \"\u0026#8211;\" + end_year.to_s\n      end\n    end\n    \n  end\n\nYou can then use your custom helper methods inside a view or layout:\n\n  \u003c%= copyright_years(2010) %\u003e\n\nServe also provides a number of stock helpers methods that are very similar to their Rails counter parts.\n\nLearn more: http://get-serve.com/documentation/view-helpers\n\n\n== Exporting\n\nTo export your project, use the new \"export\" command:\n\n  serve export project output\n\nWhere \"project\" is the path to the project and \"output\" is the path to the\ndirectory where you would like your HTML and CSS generated.\n\nLearn more: http://get-serve.com/documentation/export\n\n== \"Design First\" Prototyping\n\nIf you use a \"Design First\" methodology, you may find Serve especially useful\nfor prototyping your applications. Create a separate \"prototype\" project for\nyour application (using Serve) and copy views over into actual application\nwhen they are ready to go. This workflow allows the designer to focus on\npresentation and flow, while the developer can focuses on implementation. One\nbenefit to this approach is that the designer can identify and fix a large\nnumber of design-related problems before a feature is ever touched by the\ndeveloper. Once a feature has been completed in the prototype project it can\nalso be estimated with a high degree of accuracy.\n\n\n== Website \u0026 Documentation\n\nDetailed documentation is available on the Serve website: http://get-serve.com\nBuild status: {\u003cimg src=\"https://secure.travis-ci.org/jlong/serve.png?branch=master\" /\u003e}[http://travis-ci.org/jlong/serve]\n\n\n== Mailing List\n\nHave questions? Please don't be ashamed to ask. Post them on the mailing list:\n\nhttp://groups.google.com/group/serve-users\n\n== Coming up\n\n- We are working on a new website for serve, with a new minimal design, estimated to be released in late Augest 2015.\n\n== License\n\nServe is released under a MIT-style license and is copyright (c) 2007-2011\nJohn W. Long and Adam I. Williams. Portions have been contributed by Robert\nEvans and others. A copy of the license can be found in the LICENSE file.\n","funding_links":[],"categories":["Ruby","Frameworks"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjlong%2Fserve","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjlong%2Fserve","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjlong%2Fserve/lists"}