Skip to content

Commit

Permalink
creating files and doing database config
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Sevilleja committed Nov 13, 2013
1 parent 5e15320 commit 14b10e1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Empty file added app/routes.js
Empty file.
5 changes: 5 additions & 0 deletions config/database.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {

// the database url to connect
url : 'mongodb://node:node@mongo.onmodulus.net:27017/uwO3mypu'
}
6 changes: 4 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ var mongoose = require('mongoose'); // mongoose for mongodb

var port = process.env.PORT || 8080;

// configuration ===============================================================
// load the database config
var database = require('./config/database');

mongoose.connect('mongodb://node:node@mongo.onmodulus.net:27017/uwO3mypu'); // connect to mongoDB database on modulus.io
// configuration ===============================================================
mongoose.connect(database.url); // connect to mongoDB database on modulus.io

app.configure(function() {
app.use(express.static(__dirname + '/public')); // set the static files location /public/img will be /img for users
Expand Down

0 comments on commit 14b10e1

Please sign in to comment.