Created
October 28, 2016 16:45
-
-
Save Vader699/a446cdcceb3368ec3c69f6478fd28a4c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| import * as Mysql from 'meteor-mysql'; | |
| let connectionSettings = { | |
| host : 'localhost', | |
| user : 'sheriff', | |
| password : 'sheriffsc', | |
| database : 'sheriff' | |
| }; | |
| export let sheriffDb = Mysql.connect(connectionSettings); |
This file contains hidden or 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
| constructor(public router: Router, public zone: NgZone) { | |
| super(); | |
| this.subscribe('userList'); | |
| this.subscribe('extraDuties'); | |
| this.subscribe('duties'); | |
| this.subscribe('jobPositions'); | |
| this.subscribe('trainees'); | |
| this.autorun(() => { | |
| this.duty = Duties.findOne({duty: 'Trainer'}); | |
| this.position = JobPositions.findOne({jobPositionName: 'Detention Supervisor'}); | |
| }); | |
| } |
This file contains hidden or 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
| import {Meteor} from 'meteor/meteor'; | |
| import { sheriffDb } from './connections/sheriff_connection'; | |
| export let Users = sheriffDb.meteorCollection("users", "usersCollection"); | |
| Meteor.publish('singleUser', function(id: number) { | |
| return Users.find({id: id }); | |
| }); | |
| Meteor.publish('userList', function() { | |
| return Users.find({notEmployed: 0}); | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment