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
<!doctype html> | |
<html data-ng-app="workshopBeMEAN"> | |
<head> | |
<title>{{ workshop }}</title> | |
<style> | |
table, th, td { | |
border: 1px solid black; | |
border-collapse: collapse; | |
} | |
th, td { |
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
<!doctype html> | |
<html data-ng-app="workshopBeMEAN"> | |
<head> | |
<title>{{ workshop }}</title> | |
<style> | |
.user-avatar { | |
width: 200px; | |
} | |
.user-label { |
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
var mongoose = require('mongoose'); | |
var Schema = mongoose.Schema: | |
var MotoboySchema = new Schema({ | |
name : { type : String, default : '', required : true } | |
, cidade : { type : String, default : '', required : true } | |
, created_at : { type : Date, default : Date.now } | |
}); | |
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
var usuarioJaExiste = function ( err, data, res, req ) { | |
var dados, | |
model; | |
if ( err ) return res.json(err); | |
if ( data ) return res.json({ Error: "Usuario ja existe.", Code: 0 }); | |
dados = { | |
idFace: req.body.idFace, | |
arrayUsuario: [{ |
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
Erro: Error: ENOENT, open './../../front-end/images/imagem.jpg' |
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
update_match = function(req,res){ | |
var query = { _id : req.params.id } | |
, mod = { $pushAll : { 'matchs.campo' : [mongoose.Types.ObjectId( req.body.meuId ), | |
mongoose.Types.ObjectId( req.body.outroId )] } } | |
; | |
Model.update( query, mod, function(err,data){ | |
if (err){ console.log( err ); return res.json(err); } | |
console.log( 'Sucesso: ' + data ); |
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
var mongoose = require( 'mongoose' ); | |
var Schema = mongoose.Schema; | |
var CourseSchema = new Schema({ | |
courseName : { type : String, default: '' } | |
, description : { type : String, default: '' } | |
, videos : { type : Array, default: [] } // Pensei em deixar a ordem cresc para o video | |
// mais novo ficar no final e para só ir dando push nesse array quando tiver | |
// novos videos. |
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
pm2 logs www | |
########### Starting streaming logs for [www] process | |
PM2: 2015-02-10 17:28:00: App name:www id:0 online | |
PM2: 2015-02-10 17:28:00: App closed with code: 8 | |
PM2: 2015-02-10 17:28:00: App name:www id:0 exited | |
PM2: 2015-02-10 17:28:00: Starting execution sequence in -fork mode- for app name:www id:0 | |
PM2: 2015-02-10 17:28:00: App name:www id:0 online | |
PM2: 2015-02-10 17:28:01: App closed with code: 8 | |
PM2: 2015-02-10 17:28:01: App name:www id:0 exited | |
PM2: 2015-02-10 17:28:01: Starting execution sequence in -fork mode- for app name:www id:0 |
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
var express = require('express') | |
, path = require('path') | |
, favicon = require('serve-favicon') | |
, logger = require('morgan') | |
, bodyParser = require('body-parser') | |
, methodOverride = require('method-override') | |
, routes = require('./modules/index') | |
, users = require('./modules/users') | |
, db = require( './config/db' ) | |
; |
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
(function(){ | |
'use strict'; | |
var mongoose = require( 'mongoose' ) | |
, Schema = mongoose.Schema | |
, typeContent = 'text' | |
, refCreator = 'Chapter' | |
, ChapterSchema = { | |
created_at : { type : Date, default : Date.now } | |
, title : { type : String, default : '', required : true } |
OlderNewer