This repository has been archived by the owner on Oct 14, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
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
31 changed files
with
93 additions
and
183 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
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// URL of server | ||
var serverUrl = 'http://192.168.1.130:3030'; // eslint-disable-line | ||
var serverUrl = 'http://192.168.2.111:3030'; // eslint-disable-line | ||
console.warn('You probably need to change the URL in /public/serverUrl.js, likely to localhost:3030'); | ||
// var serverUrl = 'localhost:3030'; // eslint-disable-line |
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
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
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
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
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
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 |
---|---|---|
@@ -1,33 +1,27 @@ | ||
|
||
// Initializes the `comment` service on path `/comment` | ||
const createService = require('feathers-mongodb'); | ||
// Initializes the `comment` service on path `/comment`. (Can be re-generated.) | ||
const createService = require('feathers-nedb'); | ||
const createModel = require('../../models/comment.model'); | ||
const hooks = require('./comment.hooks'); | ||
//!code: mongo_imports //!end | ||
//!code: mongo_init //!end | ||
|
||
let moduleExports = function (app) { | ||
let paginate = app.get('paginate'); | ||
let mongoClient = app.get('mongoClient'); | ||
let options = { paginate }; | ||
//!code: mongo_func_init //!end | ||
module.exports = function (app) { | ||
const Model = createModel(app); | ||
const paginate = app.get('paginate'); | ||
|
||
const options = { | ||
name: 'comment', | ||
Model, | ||
paginate, | ||
//!code: options_more | ||
id: 'uuid', | ||
//!end | ||
}; | ||
|
||
// Initialize our service with any options it requires | ||
app.use('/comment', createService(options)); | ||
|
||
// Get our initialized service so that we can register hooks and filters | ||
const service = app.service('comment'); | ||
|
||
mongoClient.then(db => { | ||
service.Model = db.collection('comment'); | ||
}); | ||
|
||
service.hooks(hooks); | ||
//!code: mongo_func_return //!end | ||
}; | ||
//!code: mongo_more //!end | ||
|
||
//!code: mongo_exports //!end | ||
module.exports = moduleExports; | ||
|
||
//!code: mongo_funcs //!end | ||
//!code: mongo_end //!end |
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
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
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
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
Oops, something went wrong.