Browse Source

jarvis implementation

master
sipp11 9 years ago
parent
commit
0443be52b4
  1. 1
      api/controllers/FlagController.js
  2. 11
      api/controllers/ObjReferenceController.js
  3. 11
      api/controllers/ObjRevisionController.js
  4. 11
      api/controllers/UserActivityController.js
  5. 14
      api/models/ObjReference.js
  6. 14
      api/models/ObjRevision.js
  7. 14
      api/models/UserActivity.js
  8. 1
      config/bootstrap.js
  9. 13
      config/connections.js
  10. 3
      config/env/development.js
  11. 1
      config/env/production.js
  12. 12
      config/env/production/connections.js
  13. 2
      views/homepage.ejs

1
api/controllers/FlagController.js

@ -17,6 +17,7 @@ module.exports = {
or: [
{english: {contains: word}},
{thai: {contains: word}},
{iso2: word},
]
},
sort: {

11
api/controllers/ObjReferenceController.js

@ -0,0 +1,11 @@
/**
* ObjReferenceController
*
* @description :: Server-side logic for managing objreferences
* @help :: See http://sailsjs.org/#!/documentation/concepts/Controllers
*/
module.exports = {
};

11
api/controllers/ObjRevisionController.js

@ -0,0 +1,11 @@
/**
* ObjRevisionController
*
* @description :: Server-side logic for managing objrevisions
* @help :: See http://sailsjs.org/#!/documentation/concepts/Controllers
*/
module.exports = {
};

11
api/controllers/UserActivityController.js

@ -0,0 +1,11 @@
/**
* UserActivityController
*
* @description :: Server-side logic for managing useractivities
* @help :: See http://sailsjs.org/#!/documentation/concepts/Controllers
*/
module.exports = {
};

14
api/models/ObjReference.js

@ -0,0 +1,14 @@
/**
* ObjReference.js
*
* @description :: TODO: You might write a short summary of how this model works and what it represents here.
* @docs :: http://sailsjs.org/#!documentation/models
*/
module.exports = {
connection: 'jarvisBlackboard',
attributes: {
}
};

14
api/models/ObjRevision.js

@ -0,0 +1,14 @@
/**
* ObjRevision.js
*
* @description :: TODO: You might write a short summary of how this model works and what it represents here.
* @docs :: http://sailsjs.org/#!documentation/models
*/
module.exports = {
connection: 'jarvisBlackboard',
attributes: {
}
};

14
api/models/UserActivity.js

@ -0,0 +1,14 @@
/**
* UserActivity.js
*
* @description :: TODO: You might write a short summary of how this model works and what it represents here.
* @docs :: http://sailsjs.org/#!documentation/models
*/
module.exports = {
connection: 'jarvisBlackboard',
attributes: {
}
};

1
config/bootstrap.js vendored

@ -13,5 +13,6 @@ module.exports.bootstrap = function(cb) {
// It's very important to trigger this callback method when you are finished
// with the bootstrap! (otherwise your server will never lift, since it's waiting on the bootstrap)
sails.hooks.http.app.set('trust proxy', true);
cb();
};

13
config/connections.js

@ -59,13 +59,20 @@ module.exports.connections = {
hackintoshMongo: {
adapter: 'sails-mongo',
host: '10hackintosh.vnll',
host: '10hackintosh',
port: 27017,
// user: 'username',
// password: 'password',
database: 'feeder',
database: 'sails',
},
jarvisBlackboard: {
adapter: 'sails-mongo',
host: '10hackintosh',
port: 27017,
// user: 'username',
// password: 'password',
database: 'jarvis-bb',
},
/***************************************************************************
* *
* PostgreSQL is another officially supported relational database. *

3
config/env/development.js vendored

@ -18,7 +18,8 @@ module.exports = {
***************************************************************************/
models: {
connection: 'hackintoshMongo'
connection: 'jarvisBlackboard',
connection: 'hackintoshMongo',
}
};

1
config/env/production.js vendored

@ -18,6 +18,7 @@ module.exports = {
***************************************************************************/
models: {
connection: 'jarvisBlackboard',
connection: 'nj2mongo'
},

12
config/env/production/connections.js vendored

@ -1,12 +1,20 @@
module.exports.connections = {
njMongo: {
nj2mongo: {
adapter: 'sails-mongo',
host: 'nj2',
port: 27017,
// user: 'username',
// password: 'password',
database: 'bbSailer',
}
},
jarvisBlackboard: {
adapter: 'sails-mongo',
host: 'nj2',
port: 27017,
// user: 'username',
// password: 'password',
database: 'jarvis-bb',
},
};

2
views/homepage.ejs

@ -13,7 +13,7 @@ setTimeout(function sunrise () {
<div class="default-page">
<div class="header">
<h1 id="main-title" class="container"><%= __('A brand new app.') %></h1>
<h3 class="container">You're looking at: <code><%= view.pathFromApp + '.' +view.ext %></code></h3>
<h3 class="container">You're looking at: <code><%= view.pathFromApp + '.' +view.ext %></code> <%= req.ip %></h3>
</div>
<div class="main container clearfix">
<!-- <h1>Getting started</h1>

Loading…
Cancel
Save