Git Product home page Git Product logo

sinatra-template's Introduction

Sinatra Application Template

A base Sinatra application template. Just fork and build. Yay! Includes Bundler, DataMapper, and RSpec, all ready to go.

Configuration

Dependencies and all configuration is done in environment.rb. Your database is also set up here. DataMapper will use sqlite3 by default. Tests use the sqlite3-memory adapter (no configuration needed).

Add your controller actions in application.rb. Views for these actions are placed in the views directory. Static files, including a stock stylesheet, go in the public directory. Models go in the lib directory and are auto-loaded.

Environment variables that you want to expose to your application can be added in .env

Testing

Add your specs in spec; just require spec_helper.rb to pre-configure the test environment. A number of samples are provided (including a sample model, which can be removed). To run the specs:

bundle exec rake spec

Getting Started

bundle install
bundle exec foreman start

Extras

We've included a handy console script that fires up irb with your environment loaded. To load it, use the Rake task:

bundle exec rake console

Thanks

This project includes contributions from several awesome developers.

(c) 2015 Nick Plante. This code is distributed under the MIT license.

sinatra-template's People

Contributors

bryanwoods avatar charlespeach avatar garrensmith avatar mcollina avatar zapnap avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sinatra-template's Issues

Update README with a pointer to a more recent template

Yo @zapnap! I come across this repo from time to time when searching for a template to start a Sinatra app. It's pretty high in the google results.

You should think about adding a line at the top of the README to redirect to a more recent template.

Just a thought! I'll drop a link here if I find a good one that I like.

๐Ÿ˜„

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.