Permalink
Browse files

Init app

  • Loading branch information...
0 parents commit e2858b4f44ba6d42353ad8582e27c6b12f719142 @1602 1602 committed Aug 31, 2011
Showing 1,430 changed files with 135,732 additions and 0 deletions.
@@ -0,0 +1 @@
+web: node server.js
@@ -0,0 +1,3 @@
+before(function () {
+ protectFromForgery('4a10ec5f8c53b4767abdf45b8e69e65bb7369929');
+});
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title><%= title %></title>
+ <%- stylesheet_link_tag('reset', 'style') %>
+ <%- javascript_include_tag('https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js', 'rails', 'application') %>
+ <%- csrf_meta_tag() %>
+ </head>
+ <body>
+ <%- body %>
+ </body>
+</html>
@@ -0,0 +1,21 @@
+{ "development":
+ { "driver": "mongoose"
+ , "host": "localhost"
+ , "database": "default-dev"
+ }
+, "test":
+ { "driver": "mongoose"
+ , "host": "localhost"
+ , "database": "default-test"
+ }
+, "staging":
+ { "driver": "mongoose"
+ , "host": "localhost"
+ , "database": "default-staging"
+ }
+, "production":
+ { "driver": "mongoose"
+ , "host": "localhost"
+ , "database": "default-production"
+ }
+}
@@ -0,0 +1,15 @@
+var express = require('express');
+
+app.configure(function(){
+ var cwd = process.cwd();
+ app.use(express.static(cwd + '/public', {maxAge: 86400000}));
+ app.set('views', cwd + '/app/views');
+ app.set('view engine', 'ejs');
+ app.set('jsDirectory', '/javascripts/');
+ app.set('cssDirectory', '/stylesheets/');
+ app.use(express.bodyParser());
+ app.use(express.cookieParser());
+ app.use(express.session({secret: 'secret'}));
+ app.use(express.methodOverride());
+ app.use(app.router);
+});
@@ -0,0 +1,7 @@
+app.configure('development', function () {
+ app.disable('view cache');
+ app.disable('model cache');
+ app.disable('eval cache');
+ app.use(require('express').errorHandler({ dumpExceptions: true, showStack: true }));
+});
+
@@ -0,0 +1,10 @@
+app.configure('production', function () {
+ app.enable('view cache');
+ app.enable('model cache');
+ app.enable('eval cache');
+ app.enable('merge javascripts');
+ app.enable('merge stylesheets');
+ app.use(require('express').errorHandler());
+ app.settings.quiet = true;
+});
+
@@ -0,0 +1,5 @@
+app.configure('test', function(){
+ app.use(require('express').errorHandler({ dumpExceptions: true, showStack: true }));
+ app.settings.quiet = true;
+});
+
@@ -0,0 +1,3 @@
+[ "express@1.0.0"
+, "railway@0.0.1"
+]
@@ -0,0 +1,2 @@
+exports.routes = function (map) {
+};
@@ -0,0 +1,34 @@
+var mongoose = require('mongoose'),
+ Schema = mongoose.Schema,
+ ObjectId = Schema.ObjectId
+
+ , UserSchema = new Schema
+//, PostSchema = new Schema
+//, CommentSchema = new Schema
+ ;
+
+UserSchema.add({
+ email: { type: String, index: true },
+ password: { type: String },
+ activated: { type: Boolean }
+});
+mongoose.model("User", UserSchema);
+
+/*
+PostSchema.add({
+ title: { type: String },
+ content: { type: String },
+ comments: [ CommentSchema ]
+});
+mongoose.model("Post", PostSchema);
+
+CommentSchema.add({
+ title: { type: String },
+ post: { type: ObjectId, index: true }
+});
+mongoose.model("Comment", CommentSchema);
+*/
+
+['User'/*, 'Post', 'Comment'*/].forEach(function (m) {
+ module.exports[m] = mongoose.model(m);
+});

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit e2858b4

Please sign in to comment.