Skip to content
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.

heroku/heroku-buildpack-core-data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Core Data Buildpack

This is a Heroku buildpack for generating a REST web service from a Core Data model. It uses rack-core-data.

Usage

$ ls
Example.xcdatamodel

$ heroku create --stack cedar --buildpack http://github.com/mattt/heroku-buildpack-core-data.git

$ git push heroku master
...
-----> Heroku receiving push
-----> Fetching custom buildpack
-----> Core Data detected

This buildpack will detect your app if it includes a Core Data model (.xcdatamodel) file. Using rack-core-data, a REST web service that communicates with a Heroku Postgres dev database is generated according to the attributes and relationships of each entity in the data model:

Core Data Model API Endpoints
  • GET /artists
  • POST /artists
  • GET /artists/1
  • PUT /artists/1
  • DELETE /artists/1
  • GET /artists/1/songs

Limitations

The Core Data Buildpack is designed to encourage rapid prototyping, but should not be used on its own in production applications.

Rather, you are encouraged to create an application using Rack::CoreData directly, which allows you to extend the Core Data scaffolding with Rack applications, such as Rails or Sinatra, and middleware. Here's an example config.ru file:

config.ru

require 'bundler'
Bundler.require

DB = Sequel.connect(ENV['DATABASE_URL'])

run Rack::CoreData('./Example.xcdatamodeld')

Contact

Mattt Thompson

License

Core Data Buildpack is available under the MIT license. See the LICENSE file for more info.

About

A Heroku Buildpack that generates a REST webservice from a Core Data model

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages