Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rethinkdb/rethinkdb-example-sinatra-pastie
A canonical Sinatra Pastie-like application running on RethinkDB
https://github.com/rethinkdb/rethinkdb-example-sinatra-pastie
Last synced: 24 days ago
JSON representation
A canonical Sinatra Pastie-like application running on RethinkDB
- Host: GitHub
- URL: https://github.com/rethinkdb/rethinkdb-example-sinatra-pastie
- Owner: rethinkdb
- License: mit
- Archived: true
- Created: 2013-01-25T22:14:54.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2022-05-06T08:56:16.000Z (over 2 years ago)
- Last Synced: 2024-04-14T14:50:01.102Z (8 months ago)
- Language: Ruby
- Homepage:
- Size: 25.4 KB
- Stars: 41
- Watchers: 25
- Forks: 12
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: MIT-LICENSE
Awesome Lists containing this project
- awesome-rethinkdb - Pastie-like Application
README
# What is it #
A simple [Pastie.org](http://pastie.org)-like web application inspired by Nick Plante's [toopaste](https://github.com/zapnap/toopaste) project
showing how to use **RethinkDB as a backend for Sinatra applications**.The app demos the following functionality:
* Creating a new snippet (code highlighting included)
* Retrieving a snippet
* Listing snippets for a languageThe app could be easily extended to provide more interesting features like:
* pagination
* snippet expirationFork it and send us a pull request.
# Complete stack #
* [Sinatra](http://www.sinatrarb.com/)
* [RethinkDB](http://www.rethinkdb.com)# Installation #
```
git clone git://github.com/rethinkdb/rethinkdb-example-sinatra-pastie.git
cd rethinkdb-example-sinatra-pastie
bundle
```_Note_: If you don't have RethinkDB installed, you can follow [these instructions to get it up and running](http://www.rethinkdb.com/docs/install/).
# Running the application #
Running a Sinatra app is as easy as:
```
rackup
```# Credits #
* This sample app was inspired by Nick Plante's [toopaste](https://github.com/zapnap/toopaste) project.
* The snippets of code used for syntax highlighting are from Ryan Tomayko's [rocco.rb](https://github.com/rtomayko/rocco) project.
* Code highlighting in snippets is done using [Pygments](http://pygments.org) or the [Pygments web service](http://pygments.appspot.com/)
* The [Solarized dark Pygments stylesheet](https://gist.github.com/1573884) was created by Zameer Manji# License #
This demo application is licensed under the [MIT license](http://opensource.org/licenses/mit-license.php).