Permalink
Browse files

Merge branch 'tutorial' of https://github.com/MiguelMadero/geddy into…

… tutorial
  • Loading branch information...
2 parents 4451453 + 987140e commit baea29419803feec891c8b4a333b8ba7ed5d2553 @MiguelMadero committed Oct 3, 2012
View
@@ -27,9 +27,17 @@ build:
install:
@mkdir -p $(DESTDIR)$(PREFIX)/bin && \
- mkdir -p $(DESTDIR)$(PREFIX)/lib/node_modules/geddy && \
- mkdir -p ./node_modules && \
- npm install jake utilities model barista && \
+ mkdir -p $(DESTDIR)$(PREFIX)/lib/node_modules/geddy && \
+ mkdir -p ./node_modules && \
+ npm install jake utilities model barista && \
+ cp -R ./* $(DESTDIR)$(PREFIX)/lib/node_modules/geddy/ && \
+ ln -snf ../lib/node_modules/geddy/bin/cli.js $(DESTDIR)$(PREFIX)/bin/geddy && \
+ chmod 755 $(DESTDIR)$(PREFIX)/lib/node_modules/geddy/bin/cli.js && \
+ echo 'Geddy installed.'
+
+quickinstall:
+ @mkdir -p $(DESTDIR)$(PREFIX)/bin && \
+ mkdir -p $(DESTDIR)$(PREFIX)/lib/node_modules/geddy && \
cp -R ./* $(DESTDIR)$(PREFIX)/lib/node_modules/geddy/ && \
ln -snf ../lib/node_modules/geddy/bin/cli.js $(DESTDIR)$(PREFIX)/bin/geddy && \
chmod 755 $(DESTDIR)$(PREFIX)/lib/node_modules/geddy/bin/cli.js && \
@@ -6,7 +6,7 @@ var Box = function () {
this.hasMany('Things');
- this.adapter = 'Mongo';
+ this.adapter = 'mongo';
};
Box = geddy.model.register('Box', Box);
@@ -7,7 +7,7 @@ var Thing = function () {
this.belongsTo('Box');
- this.adapter = 'Mongo';
+ this.adapter = 'mongo';
};
Thing = geddy.model.register('Thing', Thing);
@@ -6,7 +6,7 @@ var Widget = function () {
this.hasOne('Thing');
- this.adapter = 'Mongo';
+ this.adapter = 'mongo';
};
Widget = geddy.model.register('Widget', Widget);
@@ -16,6 +16,6 @@ Todo = ->
@validatesWithFunction 'status', (status) ->
status == 'open' || status == 'done'
- @adapter = 'Mongo'
+ @adapter = 'mongo'
Todo = geddy.model.register 'Todo', Todo
View
Oops, something went wrong.
@@ -21,6 +21,9 @@ var config = {
, debug: true
, hostname: null
, port: 4000
+, model: {
+ defaultAdapter: 'memory'
+ }
, sessions: {
store: 'memory'
, key: 'sid'
@@ -20,6 +20,16 @@ var config = {
detailedErrors: false
, hostname: null
, port: 4000
+/* TODO: Define a defaultAdapter. You can use postgresdb, memory, mongo or riak.
+, model: {
+ defaultAdapter: 'mongo'
+ }
+, db: {
+ mongo: {
+ dbname: 'local'
+ }
+ }
+ */
, sessions: {
store: 'cookie'
, key: 'sid'
@@ -13,8 +13,6 @@ var <%= names.constructor.singular %> = function () {
<% } -%>
});
- this.adapter = "memory";
-
/*
this.property('login', 'string', {required: true});
this.property('password', 'string', {required: true});
@@ -18,7 +18,6 @@ var <%= names.constructor.singular %> = function () {
this.autoIncrementId = true;
<% } -%>
<% } -%>
- this.adapter = 'memory';
/*
this.property('login', 'string', {required: true});

0 comments on commit baea294

Please sign in to comment.