-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!DOCTYPE html> | ||
<html ng-app=''> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title></title> | ||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> | ||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> | ||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> | ||
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.min.js"></script> | ||
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular-route.min.js"></script> | ||
<script> | ||
|
||
</script> | ||
</head> | ||
<body> | ||
<div ng-view=""> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
var mongoose = require('mongoose'); | ||
var fs = require('fs'); | ||
|
||
mongoose.connect('mongodb://localhost/saburiKonnect'); | ||
|
||
var modelsPath = __dirname + '/../server/models'; | ||
|
||
fs.readdirSync(modelsPath).forEach(function(file){ | ||
if (file.indexOf('.js') > 0){ | ||
require(modelsPath + '/' + file); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
var Controller = require('./../server/controllers/controller.js'); | ||
|
||
module.exports = function(app){ | ||
app.post('/user/show', function(req, res){ | ||
Controller.show(req, res); | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"name": "saburiKonnect", | ||
"version": "0.0.1", | ||
"dependencies": { | ||
"body-parser": "latest", | ||
"express": "^4.10.0", | ||
"mongoose": "^4.0.1", | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
var express = require('express'); | ||
var app = express(); | ||
var path = require('path'); | ||
var bodyParser = require('body-parser'); | ||
|
||
app.use(bodyParser.urlencoded({ | ||
extended: true | ||
})); | ||
app.use(bodyParser.json()); | ||
app.use(express.static(path.join(__dirname, './client'))); | ||
|
||
// require('./config/mongoose.js'); | ||
// require('./config/routes.js')(app); | ||
|
||
app.listen(8000, function(){ | ||
console.log('listening on port 8000'); | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
var mongoose = require('mongoose'); | ||
// var Model = mongoose.Model('Model') | ||
|
||
module.exports = (function(){ | ||
return { | ||
add: function(req, res){ | ||
//code | ||
} | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
var mongoose = require('mongoose'); | ||
|
||
var modelSchema = new mongoose.Schema({ | ||
title: String, | ||
description: String, | ||
name: String, | ||
checked: {type: Boolean, default: false} | ||
}); | ||
|
||
mongoose.model('Model', modelSchema); |